Corfedo.Troupe 0.4.0

Prefix Reserved
dotnet add package Corfedo.Troupe --version 0.4.0
                    
NuGet\Install-Package Corfedo.Troupe -Version 0.4.0
                    
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="Corfedo.Troupe" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Corfedo.Troupe" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Corfedo.Troupe" />
                    
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 Corfedo.Troupe --version 0.4.0
                    
#r "nuget: Corfedo.Troupe, 0.4.0"
                    
#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 Corfedo.Troupe@0.4.0
                    
#: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=Corfedo.Troupe&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Corfedo.Troupe&version=0.4.0
                    
Install as a Cake Tool

Corfedo Troupe

Compose a .NET host from components that declare what they need, and catch a misconfigured host before it serves a request. As an application grows, one Program.cs wires every project into the host, projects reference each other only because that code needs them, and each new component is wired the way the nearest example was. Troupe gives every part of the host the same shape: a component declares the services it registers, the configuration it reads and the components it requires. Troupe records the owner of every registration and stops startup with a diagnostic that names the owners. When the application later runs as several processes, roles select components from the same declarations.

dotnet add package Corfedo.Troupe
dotnet add package Corfedo.Troupe.AspNetCore   # middleware stages, endpoints and Kestrel endpoints
dotnet add package Corfedo.Troupe.Testing      # composition verification and test overrides

The definition requires a component, and the component owns its configuration section:

public sealed class WorkerComposition : ICompositionDefinition
{
    public void Define(ICompositionDefinitionBuilder definition) => definition.Requires<HeartbeatComponent>();
}

public sealed class HeartbeatComponent : IComponent
{
    public void Compose(IComponentBuilder component)
    {
        component.Options<HeartbeatOptions>("Worker", (section, options) => section.Bind(options));
        component.Services(services => services.AddHostedService<HeartbeatService>());
    }
}
var builder = Host.CreateApplicationBuilder(args);
builder.AddTroupe<WorkerComposition>();
using var host = builder.Build();
await host.RunAsync();

Without a Worker section, AddTroupe throws a CompositionException with TRP005, naming HeartbeatComponent and the section, and the host never starts.

The packages depend on each other's exact version, so update them together. See the documentation for a first application, splitting into processes, guides and examples.

Troupe is licensed under Apache-2.0. Corfedo names, logos and brand assets are reserved; see the NOTICE file.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Corfedo.Troupe:

Package Downloads
Corfedo.Troupe.AspNetCore

ASP.NET Core integration for Corfedo Troupe: middleware stages, endpoints and named Kestrel endpoints declared by components, with startup checks for the pipeline and endpoint configuration.

Corfedo.Troupe.Testing

Testing support for Corfedo Troupe: verify every declared profile with real hosts, compose a slice of components and replace services with recorded test ownership.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 150 11/20/2026
0.3.0 165 11/11/2026
0.2.0 130 11/1/2026
0.1.1 177 11/1/2026