Shirubasoft.Aspire.ModularAppHosts 13.2.0

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

Shirubasoft.Aspire.ModularAppHosts

Define an Aspire resource graph once, expose it as a typed C# contract, and reuse it across AppHosts. A consumer references the producer-owned contract package; repository configuration supplies source and build context when the module is imported from another checkout.

Packages

Package Purpose
Shirubasoft.Aspire.ModularAppHosts Define, export, import, and consume modules.
Shirubasoft.Aspire.ModularAppHosts.Testing Run the same E2E tests against an AppHost or Docker Compose deployment.
Shirubasoft.Aspire.ModularAppHosts.Templates Scaffold a module contract with dotnet new aspire-module.
Shirubasoft.Aspire.ModularAppHosts.Tool Publish and apply module image workflow documents or dispatch cross-repository E2E workflows.

The runtime packages target .NET 10, the source generator supports .NET SDK 10.0.100 or later, and the Aspire-facing packages require Aspire 13.4.6 or later. The project is licensed under the MIT License.

Quick start

Prerequisites are .NET SDK 10.0.100 or later, Aspire CLI 13.4.6 or later, and a running Docker or Podman runtime. Add the core package to an AppHost or shared contract project, install the template, and scaffold a module:

dotnet add package Shirubasoft.Aspire.ModularAppHosts
dotnet new install Shirubasoft.Aspire.ModularAppHosts.Templates
dotnet new aspire-module --name CatalogModule --moduleName catalog --namespace Catalog.Modules

The generated contract is immediately runnable and can be replaced with the module's real resource graph:

using Aspire.Hosting;

namespace Catalog.Modules;

[GenerateDistributedApplicationModule(Name, Version = "1", PackageId = "Catalog.Modules")]
public static partial class CatalogModule
{
    public const string Name = "catalog";
    public const string ApiResourceName = "catalog-api";

    public static void Define(IDistributedApplicationModuleBuilder module)
    {
        module.AddContainer(ApiResourceName, "nginx", "alpine")
            .Configure((_, container) => container
                .WithHttpEndpoint(targetPort: 80, name: "http"));
    }
}

Reference the contract project or package from each consumer. The source generator creates AddCatalogModule, ImportCatalogModule, and typed resource properties:

using Catalog.Modules;

var builder = DistributedApplication.CreateBuilder(args);

var catalog = builder.AddCatalogModule();

builder.AddContainer("storefront", "nginx", "alpine")
    .WithReference(catalog.Api.GetEndpoint("http"))
    .WaitFor(catalog.Api);

await builder.Build().RunAsync();

From the AppHost directory, run aspire run and open the dashboard URL. Use ImportCatalogModule() instead when repository configuration should supply the module's source tree.

Next steps

For repository setup, validation, and releases, see Contributing.

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 (1)

Showing the top 1 NuGet packages that depend on Shirubasoft.Aspire.ModularAppHosts:

Package Downloads
Shirubasoft.Aspire.ModularAppHosts.Testing

Docker Compose deployment testing support for Shirubasoft Aspire Modular AppHosts.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.2.0 9 8/18/2026
13.1.0 135 8/15/2026
13.0.0 220 8/14/2026
12.0.1 104 8/14/2026
12.0.0 111 8/14/2026
11.0.0 124 8/13/2026
10.0.1 105 8/12/2026
10.0.0 107 8/12/2026
9.0.0 107 8/11/2026
8.1.0 111 8/11/2026
8.0.0 122 8/11/2026
7.0.0 94 8/10/2026
6.0.0 104 8/8/2026
5.0.0 162 8/7/2026
4.3.0 125 8/7/2026
4.2.0 96 8/6/2026
4.1.0 98 8/6/2026
4.0.0 104 8/5/2026
3.0.0 94 8/5/2026
2.0.0 97 8/5/2026
Loading failed