System.Composition 10.0.0-preview.7.25380.108

About

Provides the Managed Extensibility Framework (MEF) 2.0, a lightweight, attribute-driven Dependency Injection (DI) container.

MEF simplifies the composition of applications by allowing components to be loosely coupled and dynamically discovered. This package supports the development of modular and maintainable applications by enabling parts to be composed at runtime.

Key Features

  • Components are discovered and composed using attributes.
  • Provides dependency injection capabilities for loosely coupled modules.

How to Use

Running code from a discovered component.

using System.Composition;
using System.Composition.Hosting;

var configuration = new ContainerConfiguration().WithPart<Service>();

using var container = configuration.CreateContainer();

var service = container.GetExport<Service>();
service.Execute();
// Output: Service is running!

[Export]
public class Service
{
    public void Execute() => Console.WriteLine("Service is running!");
}

Main Types

The main types provided by this library are:

  • System.Composition.ExportAttribute
  • System.Composition.ImportAttribute
  • System.Composition.Convention.ConventionBuilder
  • System.Composition.Hosting.CompositionHost
  • System.Composition.CompositionContext
  • System.Composition.CompositionContextExtensions

Additional Documentation

Feedback & Contributing

System.Composition is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on System.Composition.

Packages Downloads
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/154af84a603094b52bd08b3366c4448f7481af52.
25
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/2f21c63bb29a816d4a62191a1a0739deb64d387c.
27
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/34202cc2f3e869fd70a26d8237f4552cf9e192cf.
27
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/44555193fd1135b5d53a2099f76fec91e0d1ebde.
25
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/46c8f4f56765e16b92759de8098494b36cfb84f5.
26
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/47b0a1e0ab831076eda00bb1e24b9d042d256e17.
26
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/4bdc8414790101a4da120a92cc4bc0154ac787ca.
28
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/66772aff549b2981094175a6f2f69600596c1913.
26
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/66a912c9463eebe832cf742d2fe8bb2e1a4600ec.
67
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/692d17e98436dfde74109aefe78f3507ae6c5b36.
26
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/6a5a63bbc9f4449d9bd1e95a8f9624939c3ccdc3.
27
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/cc0d213b15fdda217ad888d269d19754fa556eb4.
27
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e091728607ca0fc9efca55ccfb3e59259c6b5a0a.
28
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/ec366687c8caead948e58704ad61ed644eb91b5b.
25
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. This package was built from the source at https://github.com/dotnet/roslyn/commit/281ac90b8b5dd9fd923a353afd4af74f3246ca5c
26
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. This package was built from the source at https://github.com/dotnet/roslyn/commit/57c813192bd494bb15aaa841f415f28f50438e19
32
Microsoft.Composition
This packages provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web. Supported Platforms: - .NET Framework 4.5 - Windows 8 - Windows Phone 8.1 - Windows Phone Silverlight 8 - Portable Class Libraries
26
Microsoft.VisualStudio.Composition
Lightning fast MEF engine, supporting System.ComponentModel.Composition and System.Composition.
25
Microsoft.VisualStudio.LiveShare
Enables VS extensions to access Live Share capabilities.
28
Microsoft.VisualStudio.ProjectSystem
Reference assemblies for Visual Studio Project System Extensibility
25

https://go.microsoft.com/fwlink/?LinkID=799421

.NET Framework 4.6.2

.NET Standard 2.0

.NET 10.0

.NET 9.0

.NET 8.0

Version Downloads Last updated
10.0.0-preview.7.25380.108 1 08/14/2025
10.0.0-preview.6.25358.103 6 07/17/2025
10.0.0-preview.5.25277.114 6 06/07/2025
10.0.0-preview.4.25258.110 6 05/17/2025
10.0.0-preview.3.25171.5 9 04/14/2025
10.0.0-preview.2.25163.2 12 03/30/2025
10.0.0-preview.1.25080.5 11 03/15/2025
9.0.8 2 08/11/2025
9.0.7 6 07/10/2025
9.0.6 4 06/14/2025
9.0.5 8 05/18/2025
9.0.4 8 04/14/2025
9.0.3 9 03/15/2025
9.0.2 13 03/15/2025
9.0.1 12 01/27/2025
9.0.0 18 11/14/2024
9.0.0-rc.2.24473.5 15 11/27/2024
9.0.0-rc.1.24431.7 20 11/09/2024
9.0.0-preview.7.24405.7 17 12/05/2024
9.0.0-preview.6.24327.7 12 12/04/2024
9.0.0-preview.5.24306.7 15 12/06/2024
9.0.0-preview.4.24266.19 19 05/28/2024
9.0.0-preview.3.24172.9 18 05/10/2024
9.0.0-preview.2.24128.5 16 05/28/2024
9.0.0-preview.1.24080.9 19 05/28/2024
8.0.0 20 05/28/2024
8.0.0-rc.2.23479.6 19 05/28/2024
8.0.0-rc.1.23419.4 19 05/28/2024
8.0.0-preview.7.23375.6 15 05/28/2024
8.0.0-preview.6.23329.7 15 05/28/2024
8.0.0-preview.5.23280.8 14 05/28/2024
8.0.0-preview.4.23259.5 17 06/04/2023
8.0.0-preview.3.23174.8 20 05/28/2024
8.0.0-preview.2.23128.3 17 05/28/2024
8.0.0-preview.1.23110.8 15 05/28/2024
7.0.0 17 05/28/2024
7.0.0-rc.2.22472.3 17 05/28/2024
7.0.0-rc.1.22426.10 15 05/28/2024
7.0.0-preview.7.22375.6 17 05/28/2024
7.0.0-preview.6.22324.4 18 05/28/2024
7.0.0-preview.5.22301.12 18 05/28/2024
7.0.0-preview.4.22229.4 18 05/28/2024
7.0.0-preview.3.22175.4 15 05/28/2024
7.0.0-preview.2.22152.2 16 05/28/2024
7.0.0-preview.1.22076.8 15 05/28/2024
6.0.2-mauipre.1.22102.15 15 05/28/2024
6.0.2-mauipre.1.22054.8 20 05/28/2024
6.0.0 27 02/01/2023
6.0.0-rc.2.21480.5 16 05/28/2024
6.0.0-rc.1.21451.13 17 05/28/2024
6.0.0-preview.7.21377.19 22 05/28/2024
6.0.0-preview.6.21352.12 20 05/28/2024
6.0.0-preview.5.21301.5 21 05/28/2024
6.0.0-preview.4.21253.7 17 05/28/2024
6.0.0-preview.3.21201.4 21 05/28/2024
6.0.0-preview.2.21154.6 17 05/28/2024
6.0.0-preview.1.21102.12 18 05/28/2024
5.0.1 22 06/29/2023
5.0.0 18 05/28/2024
5.0.0-rc.2.20475.5 16 05/28/2024
5.0.0-rc.1.20451.14 17 05/28/2024
5.0.0-preview.8.20407.11 17 05/28/2024
5.0.0-preview.7.20364.11 19 05/28/2024
5.0.0-preview.6.20305.6 18 05/28/2024
5.0.0-preview.5.20278.1 17 05/28/2024
5.0.0-preview.4.20251.6 18 05/28/2024
5.0.0-preview.3.20214.6 15 05/28/2024
5.0.0-preview.2.20160.6 17 05/28/2024
5.0.0-preview.1.20120.5 16 05/28/2024
1.4.1 22 05/28/2024
1.4.0 22 05/28/2024
1.4.0-preview3.19551.4 20 05/28/2024
1.4.0-preview2.19523.17 17 05/28/2024
1.4.0-preview1.19504.10 17 05/28/2024
1.3.0 19 05/28/2024
1.3.0-rc1.19456.4 15 05/28/2024
1.3.0-preview9.19421.4 17 05/28/2024
1.3.0-preview9.19416.11 20 05/28/2024
1.3.0-preview8.19405.3 21 05/28/2024
1.3.0-preview7.19362.9 21 05/28/2024
1.3.0-preview6.19303.8 18 05/28/2024
1.3.0-preview6.19264.9 20 05/28/2024
1.3.0-preview5.19224.8 18 05/28/2024
1.3.0-preview4.19212.13 17 05/28/2024
1.3.0-preview3.19128.7 14 05/28/2024
1.3.0-preview.19073.11 18 05/28/2024
1.3.0-preview.18571.3 20 05/28/2024
1.2.0 16 05/28/2024
1.2.0-rc1 26 05/28/2024
1.2.0-preview2-26406-04 18 05/28/2024
1.2.0-preview1-26216-02 17 05/28/2024
1.1.0 18 05/28/2024
1.1.0-preview2-25405-01 21 05/28/2024
1.1.0-preview1-25305-02 18 05/28/2024
1.0.31 60 05/05/2022
1.0.31-preview1-24530-04 22 05/28/2024