System.Composition.Runtime 11.0.0-preview.1.26104.118

Prefix Reserved
This is a prerelease version of System.Composition.Runtime.
dotnet add package System.Composition.Runtime --version 11.0.0-preview.1.26104.118
                    
NuGet\Install-Package System.Composition.Runtime -Version 11.0.0-preview.1.26104.118
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="System.Composition.Runtime" Version="11.0.0-preview.1.26104.118" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="System.Composition.Runtime" Version="11.0.0-preview.1.26104.118" />
                    
Directory.Packages.props
<PackageReference Include="System.Composition.Runtime" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add System.Composition.Runtime --version 11.0.0-preview.1.26104.118
                    
#r "nuget: System.Composition.Runtime, 11.0.0-preview.1.26104.118"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package System.Composition.Runtime@11.0.0-preview.1.26104.118
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=System.Composition.Runtime&version=11.0.0-preview.1.26104.118&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=System.Composition.Runtime&version=11.0.0-preview.1.26104.118&prerelease
                    
Install as a Cake Tool

About

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.

Key Features

  • Facilitates runtime discovery and composition of parts.

How to Use

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();
    }
}

Main Types

The main type provided by this library is:

  • System.Composition.CompositionContext

Additional Documentation

Feedback & Contributing

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

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.

NuGet packages (39)

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

GitHub repositories (1)

Showing the top 1 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.
Version Downloads Last Updated
11.0.0-preview.1.26104.118 142 2/10/2026
10.0.3 26,020 2/10/2026
10.0.2 69,273 1/13/2026
10.0.1 103,560 12/9/2025
10.0.0 92,960 11/11/2025
10.0.0-rc.2.25502.107 1,091 10/14/2025
10.0.0-rc.1.25451.107 922 9/9/2025
10.0.0-preview.7.25380.108 510 8/12/2025
10.0.0-preview.6.25358.103 489 7/15/2025
10.0.0-preview.5.25277.114 635 6/6/2025
10.0.0-preview.4.25258.110 674 5/12/2025
9.0.13 970 2/10/2026
9.0.12 3,341 1/13/2026
9.0.11 17,254 11/11/2025
9.0.10 110,874 10/14/2025
9.0.9 123,391 9/9/2025
9.0.8 71,890 8/4/2025
9.0.7 64,234 7/8/2025
9.0.6 170,891 6/10/2025
9.0.5 76,454 5/13/2025
Loading failed