dotnet-aspire
.NET Aspire - local orchestration
Aspire is a way to describe a distributed app as one object graph and run the whole thing - APIs, workers, the Postgres they talk to, the Redis cache, the broker - with a single F5. The payoff is local: everything starts together with the right connection strings already threaded between resources, and one dashboard shows the traces, logs, and metrics for every process. Floor is .NET 8 / C# 12.
Aspire is two cooperating pieces, and this skill is about both:
- the AppHost, a small project that declares the topology and orchestrates the local run;
- ServiceDefaults, a shared library every service calls into for the cross-cutting plumbing.
The cross-cutting plumbing itself - OpenTelemetry exporters, the health-check probes, the resilience handlers - is configured by dotnet-web-backend. ServiceDefaults is just the composition point where they all get registered in one call. This skill owns the orchestration; it does not re-teach what goes inside the defaults.
What Aspire is and is not
- It orchestrates a local development run. It is not a deployment system. The graph you write here drives
dotnet runon the AppHost; getting the app onto a server is a separate concern that belongs to your CI and container tooling, and is out of scope for this skill. - It does not change how your services are written. A service still reads a connection string from configuration and constructs its clients the ordinary way - the AppHost is what hands it that connection string. Keep Aspire's client packages and resource types out of business logic; if you find yourself reaching for an Aspire type inside a handler, the wiring has leaked into the wrong layer.
- Prefer the first-party integrations - Postgres, Redis, RabbitMQ, SQL Server, and the rest - over standing up a bare container and configuring it yourself. Each integration package handles the connection string, registers a health check, and emits traces, so you inherit observability and readiness for free instead of bolting them on.
The AppHost owns the topology
One AppHost project is the single place that knows which resources exist and how they depend on each other. It is a normal console app whose Program.cs builds a DistributedApplication: