Shirubasoft.Aspire.Extensions.Multirepo
16.1.0
dotnet add package Shirubasoft.Aspire.Extensions.Multirepo --version 16.1.0
NuGet\Install-Package Shirubasoft.Aspire.Extensions.Multirepo -Version 16.1.0
<PackageReference Include="Shirubasoft.Aspire.Extensions.Multirepo" Version="16.1.0" />
<PackageVersion Include="Shirubasoft.Aspire.Extensions.Multirepo" Version="16.1.0" />
<PackageReference Include="Shirubasoft.Aspire.Extensions.Multirepo" />
paket add Shirubasoft.Aspire.Extensions.Multirepo --version 16.1.0
#r "nuget: Shirubasoft.Aspire.Extensions.Multirepo, 16.1.0"
#:package Shirubasoft.Aspire.Extensions.Multirepo@16.1.0
#addin nuget:?package=Shirubasoft.Aspire.Extensions.Multirepo&version=16.1.0
#tool nuget:?package=Shirubasoft.Aspire.Extensions.Multirepo&version=16.1.0
Shirubasoft.Aspire.Extensions.Multirepo
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.Extensions.Multirepo |
Define, export, import, and consume modules. |
Shirubasoft.Aspire.Extensions.Multirepo.Testing |
Run the same E2E tests against an AppHost or Docker Compose deployment. |
Shirubasoft.Aspire.Extensions.Multirepo.Templates |
Scaffold a module contract with dotnet new aspire-module. |
Shirubasoft.Aspire.Extensions.Multirepo.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.5.3 or later. The project uses the repository's MIT License.
Quick start
Prerequisites are .NET SDK 10.0.100 or later, Aspire CLI 13.5.3 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.Extensions.Multirepo
dotnet new install Shirubasoft.Aspire.Extensions.Multirepo.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. Generated add/import methods also work inside module definitions, so a parent module can own and materialize its local or imported dependencies.
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.5.3)
- CliWrap (>= 3.10.4)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Shirubasoft.Aspire.Extensions.Multirepo:
| Package | Downloads |
|---|---|
|
Shirubasoft.Aspire.Extensions.Multirepo.Testing
Docker Compose deployment testing support for Aspire multi-repository AppHosts. |
GitHub repositories
This package is not used by any popular GitHub repositories.