What Problems Does Aspire Solve?
Building distributed applications is hard. You need to:- Orchestrate multiple services during development
- Configure service discovery and communication
- Set up telemetry, logging, and monitoring
- Manage dependencies between services
- Deploy to cloud platforms
Key Features
Code-First App Model
Define your entire application - services, resources, and connections - in a single C# program. No YAML, no configuration sprawl.
Built-in Orchestration
Launch and debug your entire distributed app locally with one command. Aspire handles port allocation, environment variables, and startup order.
Observable by Default
Get structured logging, distributed tracing, and metrics out of the box with the built-in dashboard. No additional setup required.
40+ Integrations
Ready-to-use packages for databases (PostgreSQL, SQL Server, Redis, MongoDB), message queues (RabbitMQ, Kafka), and cloud services (Azure).
Multi-Language Support
Build polyglot applications with support for C#, Python, TypeScript, Go, Java, and Rust - all managed from a single app model.
Deploy Anywhere
Deploy to Kubernetes, Azure Container Apps, or any cloud platform using the same composition you use for local development.
How Aspire Works
At the center of Aspire is the app model - a code-first, single source of truth that defines your application’s services, resources, and connections.Define Your App
Create an AppHost project that declares all your services and resources using a fluent API:
Program.cs
Run and Debug
Launch your entire application with a single command:Or press F5 in Visual Studio or VS Code. Aspire automatically:
- Starts all services in the correct order
- Allocates ports and sets up service discovery
- Injects connection strings and configuration
- Launches the dashboard for monitoring
Monitor with the Dashboard
The Aspire Dashboard gives you real-time insights into your running application:
- View all resources and their health status
- Browse structured logs across all services
- Explore distributed traces to understand request flows
- Monitor metrics and performance counters
The Aspire App Model
The app model is a graph of resources - services, infrastructure elements, and supporting components - defined using strongly-typed, extensible abstractions.Resources
A resource is the fundamental unit in Aspire. Resources represent:- .NET projects - Your ASP.NET Core apps, worker services, etc.
- Containers - Databases, message queues, and other containerized services
- Executables - Node.js apps, Python services, Java applications
- Cloud resources - Azure Storage, Service Bus, Cosmos DB
Dependencies and References
You connect resources using.WithReference(), which:
- Creates explicit dependencies in the resource graph
- Sets up service discovery automatically
- Injects connection strings and configuration
- Controls startup order
Program.cs (API Service)
Architecture Components
Aspire consists of several key components:AppHost
The AppHost is a special .NET project that defines your application model. It’s where you declare all services, resources, and their relationships.Service Defaults
Service defaults provide baseline configurations for your services, including:- OpenTelemetry for structured logging, tracing, and metrics
- Health checks and readiness probes
- Service discovery client configuration
- Resilience patterns (retry, circuit breaker, timeout)
Program.cs (in your service)
Dashboard
The Aspire Dashboard is a browser-based application that shows:- All resources in your app and their status
- Live console logs from each service
- Structured logs with filtering and search
- Distributed traces across service boundaries
- Metrics and performance data
The dashboard runs locally during development and can also be deployed for production monitoring.
Integration Packages
Aspire provides two types of integration packages: Hosting integrations (for AppHost):Aspire.Hosting.PostgreSQLAspire.Hosting.RedisAspire.Hosting.RabbitMQ- And 40+ more…
Aspire.NpgsqlAspire.StackExchange.RedisAspire.RabbitMQ.Client- And matching client libraries…
CLI
The Aspire CLI provides commands for:- Creating new projects:
aspire new - Running your app:
aspire run - Deploying to production:
aspire deploy - Managing configuration:
aspire config - Viewing logs:
aspire logs
Why Choose Aspire?
Faster Development
Faster Development
Skip the boilerplate. No more copying Docker Compose files, writing connection string logic, or manually configuring telemetry. Aspire handles it all.
Better Local Experience
Better Local Experience
Run your entire distributed application locally with hot reload support. See changes instantly without rebuilding containers or restarting services.
Production-Ready Defaults
Production-Ready Defaults
Get logging, tracing, metrics, health checks, and resilience patterns configured correctly from day one. Follow .NET best practices automatically.
Flexible and Extensible
Flexible and Extensible
Build custom resource types, create your own integrations, and extend the app model to fit your needs. Aspire is open and extensible.
Deploy Anywhere
Deploy Anywhere
Use the same app model for local development and production deployment. Target Kubernetes, Azure, AWS, or your own infrastructure.
Example Application
Here’s a complete example of a simple e-commerce application with Aspire:AppHost/Program.cs
- Redis for caching
- PostgreSQL with two databases
- RabbitMQ for messaging
- Three backend services
- A web frontend
Next Steps
Quickstart
Build your first Aspire app in 5 minutes
Installation
Install Aspire on your machine
Core Concepts
Deep dive into the app model and resources
Integrations
Explore available hosting integrations