System.Composition 11.0.0-preview.5.26302.115

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.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
183
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/ec4841263590f5456e32728d98097e97c1605e22.
142
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/04c76c9d58c7911e2fd199da145cd97bbf283438.
139
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/8e1779e16298415843e85029d8b52a1ae9bb4c30.
133
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/fa8e2c9b566e4471a3509fc63d7baca0a2a6d30b.
132
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
130
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/e5eb71d6714749bccf91d9268ece78cd5d4d43ea.
130
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/256d46e2333636eccd52866ca6f698f0ef4b9910.
126
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/df45061e218c9b5813c5531bc06fb238a23e30f6.
126
Microsoft.CodeAnalysis.CSharp.Workspaces
.NET Compiler Platform ("Roslyn") support for analyzing C# projects and solutions. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/fa72fa61b0d822ea8a3fbeb96f668340419ab5cd.
126
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.
125
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/2fc92d84e746c3aab75f0930278ea6675cd5bb5c.
124
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/ebbf56c257fb4d3128d3487ef525d92e9f94b412.
124
Microsoft.CodeAnalysis.CSharp.Features
.NET Compiler Platform ("Roslyn") support for creating C# editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e68227ea677b76a3c603bd616f03ea6d952b2458.
124
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/7a63d79b60ffb33e919bee8056816f8f449d00ce.
124
Microsoft.CodeAnalysis.Workspaces.MSBuild
.NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one of the following packages to add the appropriate language support: - Microsoft.CodeAnalysis.CSharp.Workspaces - Microsoft.CodeAnalysis.VisualBasic.Workspaces More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e482b6e281d7db727fcb086ebbfae44dcba82c6d.
123
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/1cb14195ed43eefdf7f9de59140ff6db70eea76e.
123
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/beada51586dedc46a7fe5ca381ffb10e2b177070.
123
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/c3cc1d0ceeab1a65da0217e403851a1e8a30086a.
122
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/4c32f5e4e9c0828a94fd4d1c9c0994082c85aaf3.
121

.NET 10.0

.NET 11.0

.NET Framework 4.6.2

.NET Standard 2.0

Version Downloads Last updated
11.0.0-preview.5.26302.115 2 6/12/2026
11.0.0-preview.4.26230.115 14 5/12/2026
11.0.0-preview.3.26207.106 15 5/4/2026
11.0.0-preview.2.26159.112 18 3/12/2026
11.0.0-preview.1.26104.118 18 2/14/2026
10.0.9 2 6/13/2026
10.0.8 12 5/12/2026
10.0.7 12 5/4/2026
10.0.6 13 5/4/2026
10.0.5 19 3/14/2026
10.0.4 14 3/12/2026
10.0.3 19 2/14/2026
10.0.2 21 1/16/2026
10.0.1 25 12/12/2025
10.0.0 50 11/12/2025
10.0.0-rc.2.25502.107 60 10/17/2025
10.0.0-rc.1.25451.107 59 9/10/2025
10.0.0-preview.7.25380.108 75 8/13/2025
10.0.0-preview.6.25358.103 68 7/26/2025
10.0.0-preview.5.25277.114 71 6/8/2025
10.0.0-preview.4.25258.110 81 5/15/2025
10.0.0-preview.3.25171.5 75 4/11/2025
10.0.0-preview.2.25163.2 70 3/25/2025
10.0.0-preview.1.25080.5 92 2/27/2025
9.0.17 2 6/13/2026
9.0.16 13 5/12/2026
9.0.15 13 5/4/2026
9.0.14 16 3/12/2026
9.0.13 19 2/14/2026
9.0.12 18 1/16/2026
9.0.11 43 11/12/2025
9.0.10 66 10/17/2025
9.0.9 74 9/10/2025
9.0.8 85 8/7/2025
9.0.7 78 7/13/2025
9.0.6 93 6/13/2025
9.0.5 82 5/16/2025
9.0.4 87 4/11/2025
9.0.3 93 3/15/2025
9.0.2 93 2/18/2025
9.0.1 110 1/18/2025
9.0.0 107 11/13/2024
9.0.0-rc.2.24473.5 87 10/25/2024
9.0.0-rc.1.24431.7 100 9/12/2024
9.0.0-preview.7.24405.7 96 8/15/2024
9.0.0-preview.6.24327.7 93 7/10/2024
9.0.0-preview.5.24306.7 98 6/14/2024
9.0.0-preview.4.24266.19 96 6/5/2024
9.0.0-preview.3.24172.9 97 4/19/2024
9.0.0-preview.2.24128.5 96 3/26/2024
9.0.0-preview.1.24080.9 99 2/22/2024
8.0.0 122 11/15/2023
8.0.0-rc.2.23479.6 95 10/12/2023
8.0.0-rc.1.23419.4 120 9/21/2023
8.0.0-preview.7.23375.6 102 8/23/2023
8.0.0-preview.6.23329.7 109 8/3/2023
8.0.0-preview.5.23280.8 109 8/3/2023
8.0.0-preview.4.23259.5 102 5/20/2023
8.0.0-preview.3.23174.8 110 5/17/2023
8.0.0-preview.2.23128.3 112 8/24/2023
8.0.0-preview.1.23110.8 123 2/24/2023
7.0.0 126 12/6/2022
7.0.0-rc.2.22472.3 103 12/7/2022
7.0.0-rc.1.22426.10 101 9/17/2022
7.0.0-preview.7.22375.6 109 9/17/2022
7.0.0-preview.6.22324.4 105 9/17/2022
7.0.0-preview.5.22301.12 104 6/30/2022
7.0.0-preview.4.22229.4 113 6/30/2022
7.0.0-preview.3.22175.4 98 6/30/2022
7.0.0-preview.2.22152.2 105 6/30/2022
7.0.0-preview.1.22076.8 114 6/30/2022
6.0.2-mauipre.1.22102.15 102 6/30/2022
6.0.2-mauipre.1.22054.8 120 6/30/2022
6.0.0 120 6/30/2022
6.0.0-rc.2.21480.5 107 6/30/2022
6.0.0-rc.1.21451.13 98 6/30/2022
6.0.0-preview.7.21377.19 112 6/30/2022
6.0.0-preview.6.21352.12 114 6/30/2022
6.0.0-preview.5.21301.5 107 6/30/2022
6.0.0-preview.4.21253.7 106 6/30/2022
6.0.0-preview.3.21201.4 103 6/30/2022
6.0.0-preview.2.21154.6 109 6/30/2022
6.0.0-preview.1.21102.12 105 6/30/2022
5.0.1 119 6/30/2022
5.0.0 120 6/30/2022
5.0.0-rc.2.20475.5 104 6/30/2022
5.0.0-rc.1.20451.14 100 6/30/2022
5.0.0-preview.8.20407.11 101 6/30/2022
5.0.0-preview.7.20364.11 111 6/30/2022
5.0.0-preview.6.20305.6 109 6/30/2022
5.0.0-preview.5.20278.1 102 6/30/2022
5.0.0-preview.4.20251.6 109 6/30/2022
5.0.0-preview.3.20214.6 107 6/30/2022
5.0.0-preview.2.20160.6 109 6/30/2022
5.0.0-preview.1.20120.5 113 6/30/2022
1.4.1 141 6/30/2022
1.4.0 121 6/30/2022
1.4.0-preview3.19551.4 113 6/30/2022
1.4.0-preview2.19523.17 105 6/30/2022
1.4.0-preview1.19504.10 109 6/30/2022
1.3.0 123 6/30/2022
1.3.0-rc1.19456.4 114 6/30/2022
1.3.0-preview9.19421.4 114 6/30/2022
1.3.0-preview9.19416.11 121 6/30/2022
1.3.0-preview8.19405.3 102 6/30/2022
1.3.0-preview7.19362.9 105 6/30/2022
1.3.0-preview6.19303.8 107 6/30/2022
1.3.0-preview6.19264.9 100 6/30/2022
1.3.0-preview5.19224.8 107 6/30/2022
1.3.0-preview4.19212.13 111 6/30/2022
1.3.0-preview3.19128.7 100 6/30/2022
1.3.0-preview.19073.11 107 6/30/2022
1.3.0-preview.18571.3 111 6/30/2022
1.2.0 116 6/30/2022
1.2.0-rc1 120 6/30/2022
1.2.0-preview2-26406-04 110 6/30/2022
1.2.0-preview1-26216-02 121 6/30/2022
1.1.0 107 6/30/2022
1.1.0-preview2-25405-01 116 6/30/2022
1.1.0-preview1-25305-02 106 6/30/2022
1.0.31 137 6/30/2022
1.0.31-preview1-24530-04 110 6/30/2022