![]() |
VOOZH | about |
dotnet add package System.Composition.Runtime --version 10.0.9
NuGet\Install-Package System.Composition.Runtime -Version 10.0.9
<PackageReference Include="System.Composition.Runtime" Version="10.0.9" />
<PackageVersion Include="System.Composition.Runtime" Version="10.0.9" />Directory.Packages.props
<PackageReference Include="System.Composition.Runtime" />Project file
paket add System.Composition.Runtime --version 10.0.9
#r "nuget: System.Composition.Runtime, 10.0.9"
#:package System.Composition.Runtime@10.0.9
#addin nuget:?package=System.Composition.Runtime&version=10.0.9Install as a Cake Addin
#tool nuget:?package=System.Composition.Runtime&version=10.0.9Install as a Cake Tool
System.Composition.Runtime is part of the Managed Extensibility Framework (MEF) 2.0, a composition library for .NET that enables dependency injection through attributes or conventions.
This package enables the discovery and composition of parts in applications using MEF 2.0. It offers the runtime implementation needed for managing composable parts, resolving dependencies, and dynamically wiring components together.
Resolve dependencies on the fly and can be useful for dynamically loaded components or plugins.
using System.Composition;
using System.Composition.Hosting;
var configuration = new ContainerConfiguration()
.WithPart<Service>();
using CompositionHost container = configuration.CreateContainer();
var consumer = new Consumer(container);
consumer.Execute();
// Service is running.
public interface IService
{
void Run();
}
[Export(typeof(IService))]
public class Service : IService
{
public void Run() => Console.WriteLine("Service is running.");
}
public class Consumer(CompositionContext context)
{
public void Execute()
{
// Use the context to resolve the service
var service = context.GetExport<IService>();
service.Run();
}
}
The main type provided by this library is:
System.Composition.CompositionContextSystem.Composition.Runtime 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 is compatible. 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 is compatible. 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 is compatible. 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 was computed. 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 was computed. net462 net462 is compatible. 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.Runtime:
| Package | Downloads |
|---|---|
|
System.Composition
Provides a version of the Managed Extensibility Framework (MEF) that is lightweight and specifically optimized for high throughput scenarios, such as the web. |
|
|
System.Composition.Hosting
Provides Managed Extensibility Framework (MEF) types that are useful to developers of extensible applications, or hosts. |
|
|
System.Composition.TypedParts
Provides container configuration and some extension methods for the Managed Extensibility Framework (MEF). |
|
|
Microsoft.VisualStudio.Utilities
A member of the Visual Studio SDK |
|
|
Microsoft.VisualStudio.Shell.Framework
A member of the Visual Studio SDK |
Showing the top 20 popular GitHub repositories that depend on System.Composition.Runtime:
| Repository | Stars |
|---|---|
|
dotnet/roslyn
The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
|
|
|
Ourpalm/ILRuntime
Pure C# IL Intepreter Runtime, which is fast and reliable for scripting requirement on enviorments, where jitting isn't possible.
|
|
|
neuecc/Utf8Json
Definitely Fastest and Zero Allocation JSON Serializer for C#(NET, .NET Core, Unity, Xamarin).
|
|
|
security-code-scan/security-code-scan
Vulnerability Patterns Detector for C# and VB.NET
|
|
|
icsharpcode/RefactoringEssentials
Refactoring Essentials for Visual Studio
|
|
|
chummer5a/chummer5a
Character generator for Shadowrun 5th edition
|
|
|
sharpenrocks/Sharpen
Visual Studio extension that intelligently introduces new C# features into your existing codebase
|
|
|
sonatype-nexus-community/DevAudit
Open-source, cross-platform, multi-purpose security auditing tool
|
|
|
curiosity-ai/h5
🚀 The next generation C# to JavaScript compiler
|
|
|
dotnet/platform-compat
Roslyn analyzer that finds usages of APIs that will throw PlatformNotSupportedException on certain platforms.
|
|
|
godotengine/godot-csharp-visualstudio
Godot C# extension for Visual Studio
|
|
|
oleg-shilo/cs-script.npp
CS-Script (C# Intellisense) plugin for Notepad++ (x86/x64)
|
|
|
PeterWaher/IoTGateway
New project
|
|
|
loamen/Kalman.Studio
Kalman.Studio代码生成器是一款基于T4模板引擎的代码生成器和开发辅助工具。可以根据数据库元数据架构信息来生成代码,还可以解析PowerDesigner物理模型文件,根据PDM模型对象来生成代码等。
|
|
| ylatuya/XAMLator | |
|
rexcardan/Evil-DICOM
A C# DICOM Library
|
|
|
mavaddat/wasp
Windows Automation Snapin for PowerShell
|
|
|
geaz/sharpDox
A c# documentation tool (Discontinued)
|
|
|
szehetner/InliningAnalyzer
Inlining Analyzer is a Visual Studio Extension that shows in the source code if a method call will be inlined by the JIT compiler.
|
|
|
realvizu/QuickDiagram
Code visualization tool for C# to quickly explore, navigate and document source code structure and relationships. Integrates into Visual Studio.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.5.26302.115 | 120 | 6/9/2026 |
| 11.0.0-preview.4.26230.115 | 367 | 5/12/2026 |
| 11.0.0-preview.3.26207.106 | 316 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 315 | 3/10/2026 |
| 11.0.0-preview.1.26104.118 | 297 | 2/10/2026 |
| 10.0.9 | 23,395 | 6/9/2026 |
| 10.0.8 | 76,183 | 5/12/2026 |
| 10.0.7 | 104,966 | 4/21/2026 |
| 10.0.6 | 16,871 | 4/14/2026 |
| 10.0.5 | 212,760 | 3/12/2026 |
| 10.0.4 | 22,236 | 3/10/2026 |
| 10.0.3 | 151,820 | 2/10/2026 |
| 10.0.2 | 131,485 | 1/13/2026 |
| 10.0.1 | 220,843 | 12/9/2025 |
| 9.0.17 | 642 | 6/9/2026 |
| 9.0.16 | 2,937 | 5/12/2026 |
| 9.0.15 | 4,878 | 4/14/2026 |
| 9.0.14 | 3,737 | 3/10/2026 |
| 9.0.13 | 4,700 | 2/10/2026 |
| 9.0.12 | 8,288 | 1/13/2026 |