![]() |
VOOZH | about |
dotnet add package System.Composition --version 10.0.9
NuGet\Install-Package System.Composition -Version 10.0.9
<PackageReference Include="System.Composition" Version="10.0.9" />
<PackageVersion Include="System.Composition" Version="10.0.9" />Directory.Packages.props
<PackageReference Include="System.Composition" />Project file
paket add System.Composition --version 10.0.9
#r "nuget: System.Composition, 10.0.9"
#:package System.Composition@10.0.9
#addin nuget:?package=System.Composition&version=10.0.9Install as a Cake Addin
#tool nuget:?package=System.Composition&version=10.0.9Install as a Cake Tool
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.
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!");
}
The main types provided by this library are:
System.Composition.ExportAttributeSystem.Composition.ImportAttributeSystem.Composition.Convention.ConventionBuilderSystem.Composition.Hosting.CompositionHostSystem.Composition.CompositionContextSystem.Composition.CompositionContextExtensionsSystem.Composition is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 is compatible. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 is compatible. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on System.Composition:
| Package | 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/16f9bd284cd49604ac82998bfe778a8eb16d4347. |
|
|
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/16f9bd284cd49604ac82998bfe778a8eb16d4347. |
|
|
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/16f9bd284cd49604ac82998bfe778a8eb16d4347. |
|
|
Microsoft.CodeAnalysis.VisualBasic.Workspaces
.NET Compiler Platform ("Roslyn") support for analyzing Visual Basic 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/16f9bd284cd49604ac82998bfe778a8eb16d4347. |
|
|
Microsoft.CodeAnalysis.Features
.NET Compiler Platform ("Roslyn") support for creating editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/16f9bd284cd49604ac82998bfe778a8eb16d4347. |
Showing the top 20 popular GitHub repositories that depend on System.Composition:
| Repository | Stars |
|---|---|
|
BeyondDimension/SteamTools
🛠「Watt Toolkit」是一个开源跨平台的多功能 Steam 工具箱。
|
|
|
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
|
|
|
JustArchiNET/ArchiSteamFarm
C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
|
|
|
dotnet/docfx
Static site generator for .NET API documentation.
|
|
|
Ourpalm/ILRuntime
Pure C# IL Intepreter Runtime, which is fast and reliable for scripting requirement on enviorments, where jitting isn't possible.
|
|
|
roslynpad/roslynpad
A cross-platform C# editor based on Roslyn and AvalonEdit
|
|
|
apache/lucenenet
Apache Lucene.NET is an open-source full-text search library written in C#, ported from the Apache Lucene project.
|
|
|
neuecc/Utf8Json
Definitely Fastest and Zero Allocation JSON Serializer for C#(NET, .NET Core, Unity, Xamarin).
|
|
|
rubberduck-vba/Rubberduck
Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
|
|
|
OmniSharp/omnisharp-roslyn
OmniSharp server (HTTP, STDIO) based on Roslyn workspaces
|
|
|
VitalElement/AvalonStudio
Cross platform IDE and Shell
|
|
|
KirillOsenkov/SourceBrowser
Source browser website generator that powers https://source.dot.net, https://referencesource.microsoft.com and https://sourceroslyn.io
|
|
|
dotnet/SqlClient
Microsoft.Data.SqlClient provides database connectivity to SQL Server for .NET applications.
|
|
|
security-code-scan/security-code-scan
Vulnerability Patterns Detector for C# and VB.NET
|
|
|
danielpalme/IocPerformance
Performance comparison of .NET IoC containers
|
|
|
microsoft/binskim
A binary static analysis tool that provides security and correctness results for Windows Portable Executable and *nix ELF binary formats
|
|
|
dotnet/arcade
Tools that provide common build infrastructure for multiple .NET Foundation projects.
|
|
|
icsharpcode/RefactoringEssentials
Refactoring Essentials for Visual Studio
|
|
|
chummer5a/chummer5a
Character generator for Shadowrun 5th edition
|
|
|
FortuneN/FineCodeCoverage
Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.5.26302.115 | 114 | 6/9/2026 |
| 11.0.0-preview.4.26230.115 | 404 | 5/12/2026 |
| 11.0.0-preview.3.26207.106 | 378 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 385 | 3/10/2026 |
| 11.0.0-preview.1.26104.118 | 423 | 2/10/2026 |
| 10.0.9 | 17,228 | 6/9/2026 |
| 10.0.8 | 70,553 | 5/12/2026 |
| 10.0.7 | 78,464 | 4/21/2026 |
| 10.0.6 | 15,406 | 4/14/2026 |
| 10.0.5 | 181,773 | 3/12/2026 |
| 10.0.4 | 22,168 | 3/10/2026 |
| 10.0.3 | 147,568 | 2/10/2026 |
| 10.0.2 | 121,273 | 1/13/2026 |
| 10.0.1 | 213,609 | 12/9/2025 |
| 9.0.17 | 534 | 6/9/2026 |
| 9.0.16 | 2,743 | 5/12/2026 |
| 9.0.15 | 4,968 | 4/14/2026 |
| 9.0.14 | 3,780 | 3/10/2026 |
| 9.0.13 | 4,629 | 2/10/2026 |
| 9.0.12 | 8,116 | 1/13/2026 |