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
<PackageReference Include="Shirubasoft.Aspire.ModularAppHosts" Version="13.2.0" />
<PackageVersion Include="Shirubasoft.Aspire.ModularAppHosts" Version="13.2.0" />
<PackageReference Include="Shirubasoft.Aspire.ModularAppHosts" />
paket add Shirubasoft.Aspire.ModularAppHosts --version 13.2.0
#r "nuget: Shirubasoft.Aspire.ModularAppHosts, 13.2.0"
#:package Shirubasoft.Aspire.ModularAppHosts@13.2.0
#addin nuget:?package=Shirubasoft.Aspire.ModularAppHosts&version=13.2.0
#tool nuget:?package=Shirubasoft.Aspire.ModularAppHosts&version=13.2.0
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
- Define and import modules, including repository initialization, configuration, resource aliases, required host tools, and local project/container switching.
- Build and publish module images.
- Test an AppHost and Docker Compose deployment with one suite.
- Hand images between repositories with the workflow tool.
- Run the samples.
For repository setup, validation, and releases, see Contributing.
| Product | Versions 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. |
-
net10.0
- Aspire.Hosting (>= 13.4.6)
- CliWrap (>= 3.10.4)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
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 |