Dotnet-skills dotnet-aspire
Build, upgrade, and operate .NET Aspire 13.2.x application hosts with current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing, and Azure deployment patterns for distributed apps.
install
source · Clone the upstream repo
git clone https://github.com/managedcode/dotnet-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/managedcode/dotnet-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/catalog/Frameworks/Aspire/skills/dotnet-aspire" ~/.claude/skills/managedcode-dotnet-skills-dotnet-aspire && rm -rf "$T"
manifest:
catalog/Frameworks/Aspire/skills/dotnet-aspire/SKILL.mdsource content
.NET Aspire
Trigger On
,Aspire.AppHost.Sdk
,Aspire.Hosting.*
,DistributedApplication.CreateBuilder
,WithReference
,WaitFor
,AddProject
,AddRedis
,AddPostgres
,aspire run
,aspire init
, oraspire addaspire update
,Aspire.Hosting.Testing
, or a test harness that mixes an Aspire AppHost withDistributedApplicationTestingBuilderWebApplicationFactory- orchestrating multiple services and resources with an AppHost for local development or cloud deployment
- setting up
, service discovery, OpenTelemetry, health checks, or the Aspire DashboardServiceDefaults - choosing between official first-party Aspire integrations and
CommunityToolkit/Aspire - upgrading older 8.x or 9.x Aspire solutions to the current CLI and AppHost SDK model
- wiring polyglot services into an Aspire topology, especially when Go, Java, Python, or extra dev-time tools enter the picture
Workflow
- Classify the task first: new AppHost creation, existing-solution enlistment, integration wiring, testing and observability, deployment, or version upgrade.
- Prefer the current Aspire toolchain. For greenfield or modernized work, use the Aspire CLI and current AppHost SDK instead of writing new guidance around the deprecated legacy workload.
- Treat 13.2.x releases as servicing and feature updates for the current CLI-first app model, not a topology rewrite. Keep the Aspire CLI,
, and closely coupled hosting or testing packages on the same line, then rerun the AppHost and deployment checks afterAspire.AppHost.Sdk
.aspire update - Keep the AppHost code-first and topology-focused. Model services, resources, dependencies, endpoints, lifetimes, and parameters there; keep business logic out.
- Keep
narrow. It exists for telemetry, health checks, resilience, and service discovery, not shared domain models or general utility code.ServiceDefaults - Prefer official first-party Aspire integrations when they cover the requirement. Use
only when the capability gap is real: unsupported language hosts, extra dev infrastructure, or extension packages the official project does not provide.CommunityToolkit/Aspire - Validate the whole distributed system, not one project in isolation. Local success means the AppHost starts cleanly, dependencies resolve through
, the dashboard shows the expected resource graph, and end-to-end tests can exercise the topology.WithReference - For integration tests, keep one shared AppHost fixture per test session. Use
to boot the distributed app, createAspire.Hosting.Testing
or SignalR clients from the AppHost, and layerHttpClient
on top only when tests need direct Host DI, grains, or runtime services.WebApplicationFactory - When publishing, switch from local containers or emulators to managed resources deliberately and verify which services truly need external endpoints.
Architecture
flowchart LR A["Distributed-app task"] --> B{"Need code-first orchestration?"} B -->|No| C["Stay in service-level skills such as ASP.NET Core, Worker, or Orleans"] B -->|Yes| D["Create or update the AppHost"] D --> E["Model resources and services with `WithReference` and `WaitFor`"] E --> F{"Official Aspire integration exists?"} F -->|Yes| G["Use first-party Aspire integration"] F -->|No or gap remains| H["Evaluate `CommunityToolkit/Aspire`"] G --> I["Apply `ServiceDefaults`, dashboard, and tests"] H --> I I --> J{"Publishing now?"} J -->|No| K["Run locally with `aspire run` or the AppHost project"] J -->|Yes| L["Choose `azd`, App Service, or the CLI deploy/publish pipeline"]
Current Guidance
- AppHost shape: prefer current SDK-style AppHost projects using
or a file-based AppHost when that repo intentionally uses the single-file model. Recognize both as valid current patterns.Aspire.AppHost.Sdk/<version> - CLI entry points: use
for starter projects,aspire new
to add Aspire support to an existing solution or create a single-file AppHost,aspire init
to add integrations or starter pieces,aspire add
for local orchestration,aspire run
/aspire start
/aspire stop
for detached lifecycle management,aspire ps
for live resource inspection,aspire describe
for environment diagnostics,aspire doctor
for user secrets,aspire secret
for terminal documentation lookup,aspire docs
for AI agent integration,aspire agent
for the current CLI deploy pipeline,aspire deploy
for AppHost and TypeScript resource refresh, andaspire restore
for version-aware upgrades.aspire update
still exists for explicit artifact-generation flows and remains preview-sensitive.aspire publish - Patch posture: Aspire
is the current baseline release in the 13.2 line. Treat it as a current CLI and AppHost refresh, not a new topology model; align package versions, rerun13.2.2
, then revalidate local orchestration and the chosen deployment path.aspire update - App model wiring: use
for dependency and configuration flow, andWithReference(...)
for startup ordering. UseWaitFor(...)
only when the resource truly needs an externally reachable endpoint for the chosen runtime or publish target.WithExternalHttpEndpoints() - ServiceDefaults boundaries:
should stay focused on OpenTelemetry, health endpoints, service discovery,AddServiceDefaults()
resilience, and related cross-cutting infrastructure.HttpClient - Testing model: prefer Aspire closed-box testing when you need to run the distributed application as a system. Use
plus a shared fixture for AppHost lifecycle,DistributedApplicationTestingBuilder
for resource-bound clients, and aApp.CreateHttpClient(...)
wrapper only when the test must resolve DI services or in-process runtime state from the hosted app. For UI flows, initialize Playwright once in the shared fixture, create a fresh browser context per test, and capture failure artifacts.WebApplicationFactory<TEntryPoint> - Dashboard usage: treat the Aspire Dashboard as the development observability surface. It is valuable in AppHost runs and standalone OTLP scenarios, but it is not a production monitoring replacement.
- Upgrade posture: older 8.x or 9.x solutions need explicit migration work. Current guidance favors the Aspire CLI upgrade path and the newer AppHost SDK structure on
..NET 10
Selection Rules
- Use first-party Aspire when the package and docs exist for the resource or platform, especially for core .NET, Azure, cache, database, messaging, Microsoft Foundry, and standard local-container flows.
- Use
when you need polyglot app hosts beyond official coverage, extra dev-time tools around a resource, or community-maintained integrations such as SQLite, Java, Go, PowerShell, k6, MailPit, MinIO, or Meilisearch.CommunityToolkit/Aspire - Prefer the smallest surface that solves the problem. Do not add a broad toolkit extension pack when an existing first-party integration plus a normal library already fits.
- Treat toolkit packages as community-supported. Verify maturity, maintenance, external container images, and security or licensing assumptions before making them part of a production baseline.
Official Sources
- Aspire docs home
- What's new in Aspire 13.2
- AppHost
- Service defaults
- Integrations overview
- Build your first app
- Aspire CLI reference
- Upgrade Aspire
- Testing overview
- microsoft/aspire
- CommunityToolkit/Aspire
Anti-Patterns
- hardcoding service URLs or connection strings instead of using
WithReference - putting business logic, data migrations, or large configuration transforms inside the AppHost
- turning
into a dumping ground for shared models or helpersServiceDefaults - adding external HTTP endpoints everywhere instead of only where runtime or publish needs them
- defaulting to
when first-party Aspire already covers the requirementCommunityToolkit/Aspire - assuming the dashboard or local containers automatically mean production readiness
- treating Aspire tests as a mocking framework; they run the application as a real distributed system
Deliver
- a version-aware Aspire architecture or upgrade direction
- the right AppHost, ServiceDefaults, integration, and CLI workflow
- an explicit first-party versus
package decisionCommunityToolkit/Aspire - an end-to-end validation path for local orchestration, testing, and deployment
Validate
- the AppHost starts cleanly via
or the AppHost projectaspire run - resources and projects are modeled with explicit
andWithReference
relationships where neededWaitFor - consuming apps resolve endpoints and connection strings without hardcoded values
contains only cross-cutting infrastructure concernsServiceDefaults- dashboard, health checks, logs, and traces reflect the expected resource graph
- Aspire-backed integration tests reuse a shared AppHost fixture instead of booting the distributed app inside each test
- any
layer reuses connection strings and endpoints from the AppHost instead of duplicating local configWebApplicationFactory - testing and deployment guidance matches the chosen runtime: local AppHost, standalone dashboard, ACA/App Service, or the CLI deploy/publish pipeline
References
- patterns.md - Current CLI-first setup flows, AppHost patterns,
, testing, and upgrade checkpointsServiceDefaults - testing.md - Shared AppHost fixtures,
,DistributedApplicationTestingBuilder
integration, Playwright bootstrapping, and diagnosticsWebApplicationFactory - deployment.md - ACA, App Service, publish-mode, and manifest-oriented deployment guidance
- community-toolkit.md - Practical guide to
packages, capability gaps, and selection rulesCommunityToolkit/Aspire