Shirubasoft.Aspire.Extensions.ResourceGroups 1.2.0

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

Shirubasoft.Aspire.Extensions.ResourceGroups

Group related Aspire resources under logical parents without replacing their standard registration methods.

Install

Add the package to an Aspire AppHost:

dotnet add package Shirubasoft.Aspire.Extensions.ResourceGroups

The package targets .NET 10 and Aspire 13.5.3 or later within the Aspire 13.5 line.

Group resources

AddResourceGroup returns an IResourceGroupBuilder, which implements IDistributedApplicationBuilder. Call the usual Aspire registration methods on it:

using Aspire.Hosting;

var builder = DistributedApplication.CreateBuilder(args);

var backend = builder.AddResourceGroup("backend");
var api = backend.AddContainer("api", "alpine");
var worker = backend.AddContainer("worker", "alpine");

await builder.Build().RunAsync();

The dashboard shows api and worker under backend. The group is a logical resource, so Aspire omits it from published manifests and does not start a process or container for it.

A resource's own parent takes precedence over the group. This preserves child relationships created by Aspire integrations and explicit WithParentRelationship calls:

var data = builder.AddResourceGroup("data");
var database = data.AddContainer("database", "postgres", "18-alpine");

data.AddContainer("migrations", "alpine")
    .WithParentRelationship(database);

Here, database belongs to data, while migrations belongs to database.

Groups can also contain groups:

var platform = builder.AddResourceGroup("platform");
var observability = platform.AddResourceGroup("observability");

observability.AddContainer("collector", "otel/opentelemetry-collector-contrib");

Run the sample

From this extension folder, run:

aspire run --project samples/ResourceGroups.AppHost/ResourceGroups.AppHost.csproj

The dashboard shows a backend group with an API, database, and a migrations child under the database.

Package contents

The NuGet package includes the assembly, XML API documentation, this README, repository metadata, Source Link data, and a matching .snupkg symbol package.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 98 9/6/2026
1.1.0 96 9/2/2026
1.0.0 86 9/1/2026