This article lists frequently asked questions about Aspire. For a more comprehensive overview, see Aspire overview.
Why choose Aspire over Docker Compose for orchestration?
Docker Compose is excellent but is unproductive when all you want to do is run several projects or executables. Docker Compose requires developers to build container images and to run apps inside of containers. That's a barrier when you just want to run your front end, back end, workers, and a database. With Aspire, you don't need to learn anything beyond what you already know.
Configuration through declarative code is better than through YAML. Docker Compose gets complex once you attempt to do any form of abstraction or composition (for example, see the old eshopOnContainers app). In addition, there are environment variable replacements (and includes) and no types or IntelliSense, and it's hard to reason about what exactly is running. Debugging is also difficult. Aspire produces a better experience that's easy to get started and scales up to an orchestrator like Compose using a real programming language.
How to add projects to Aspire?
You can manually add projects to your Aspire solution by using the builder.AddProject("<name>", "<path/to/project.csproj>") API.
How to deploy Aspire without target cloud-provider tooling?
Aspire doesn't constrain deployment of any existing project or solution. Aspire exposes a deployment manifest that's used by tool authors to produce artifacts for deployment to any cloud provider. However, unfortunately, not all cloud providers offer tooling for deployments based on this manifest. The manifest is a simple JSON file that describes the resources of your app and the dependencies between them. The manifest is used by the Azure Developer CLI to deploy to Azure. Likewise, Aspir8 uses the manifest to deploy to Kubernetes. You can use the manifest to deploy to any cloud provider that supports the resources you're using.
If Aspire is mainly for local development, why are client integrations in my project?
Aspire's client integrations simplify your development process. They're lightweight wrappers around popular libraries like StackExchange.Redis and Npgsql, adding features such as telemetry, health checks, and resilience.
Even if you use Aspire only for local development, these integrations provide reasonable defaults, seamless dependency injection, and consistent APIs.
You're not locked into Aspire's ecosystem. These integrations are just libraries, and you can configure them as you would with the underlying libraries, using environment variables or your preferred methods.
Can Aspire apps be built without Azure dependencies and deployed elsewhere?
Yes, you can build Aspire apps without using any Azure-proprietary dependencies. While Aspire does offer a first-party solution to deploying to Azure, it's not a requirement. Aspire is a cloud-native stack that can be used to build applications that run anywhere. All Azure-specific offerings are explicitly called out as such.
Why use Aspire service discovery over Docker Compose with Kubernetes?
Aspire service discovery APIs are an abstraction that works with various providers (like Kubernetes and Consul). One of the big advantages is that it works locally and is backed by .NET's IConfiguration abstraction. This means you can implement service discovery across your compute fabric in a way that doesn't result in code changes. If you have multiple Kubernetes clusters or services on Azure App Service or Azure Functions, you don't have to fundamentally change your application code to make it work locally, either in a single cluster or across multiple clusters. That's the benefit of the abstraction.
Why use Aspire if OpenTelemetry is available in .NET?
Aspire takes a big bet on .NET's integration with OpenTelemetry. The Aspire dashboard is a standard OTLP server that visualizes various telemetry data. Leaning on these open standards makes it easy to build these things without breaking compatibility with the broader ecosystem.
Why use Aspire if Grafana, Jaeger, and Prometheus work with .NET?
Aspire isn't a replacement for these tools, but rather a complementary technology. Aspire is a set of libraries and tools that make it easy to build applications that are observable. For more information, see the Metrics example in the Aspire sample repository that shows Grafana and Prometheus.
Why create another framework when existing ones work well?
Aspire isn't a framework, it's an opinionated stack. Perhaps the most controversial parts of it are the DistributedApplication APIs that you can use to build up the orchestration model in any .NET-based language. While everything is possible today, it's not easy. Using the Unix philosophy, the entire cloud-native ecosystem is built around tying various pieces of CNCF software together to build a stack. Aspire tries to do the same thing using learnings from the cloud-native space and picks some opinions (in ways that use the same building blocks). One novel thing about how Aspire builds various pieces of the stack is that it doesn't restrict the access or compatibility of other applications, frameworks, or services. As people play with it more, they realize how composable and extensible it is.
How does Aspire differ from Microsoft Orleans?
Microsoft Orleans and Aspire are complementary technologies.
Orleans is a distributed actor-based framework. Aspire is a cloud-ready stack for building observable, production-ready, distributed applications. It includes local orchestration capabilities to simplify the developer inner loop and reusable opinionated components for integrating with commonly used application dependencies. An Orleans-based solution will still have external dependencies such as data stores and caches for which Aspire can be used for orchestration purposes.
For more information, see Use Orleans with Aspire and the corresponding Orleans voting app sample.
How does Aspire differ from Dapr?
Dapr and Aspire are complementary technologies.
Where Dapr abstracts some of the underlying cloud platform, Aspire provides opinionated configuration around the underlying cloud technologies without abstracting them. A .NET-based application that uses Dapr can use Aspire to orchestrate the local developer inner loop and streamline deployment. Aspire includes extensions that support the launching of Dapr side-car processes during the inner loop.
For more information, see Use Dapr with Aspire.
How does Aspire differ from Project Tye?
Project Tye was an experiment which explored the launching and orchestration of micro-services and support deployment into orchestrators such as Kubernetes. Aspire is a superset of Tye which includes the orchestration and deployment capabilities along with opinionated components for integrating common cloud-native dependencies. Aspire can be considered the evolution of the Project Tye experiment.
How are Aspire and Azure SDK for .NET related?
Aspire provides components that rely on the Azure SDK for .NET, to expose common functionality for storage (Azure Blob Storage, Azure Storage Queues, and Azure Table Storage), databases (Azure Cosmos DB and Azure Cosmos DB with Entity Framework Core), messaging, and security.
How are Aspire and Kubernetes related?
Aspire makes it easy to develop distributed applications that can be orchestrated on your local development environment as executables and containers. Kubernetes is a technology that orchestrates and manages containers across multiple machines. Aspire projects can produce a manifest that tool authors can use to produce artifacts for deployment to Kubernetes. In essence, Kubernetes is a deployment target for Aspire projects.
Are worker services supported in Aspire?
Yes, worker services are fully supported and there are docs and samples available to help you get started. Worker services are a great way to run background tasks, scheduled tasks, or long-running tasks in Aspire. For more information, see Database migrations with Entity Framework Core sample app.
Are Azure Functions supported in Aspire?
Yes, Aspire has preview support for integrating Azure Functions into your app.
Does Aspire support running web apps locally on IIS or IIS Express?
No. Aspire doesn't support running web apps on IIS or IIS Express.
Does Aspire support deploying apps to IIS?
No. Aspire doesn't support deploying apps to IIS. However, it doesn't prevent you from deploying your apps to IIS in the same way that you always have.
How to fix integrations and Service Discovery issues when deploying Aspire apps to IIS?
Aspire integrations require specific configuration that must be provided manually. The same is true for Service Discovery, ideally, you should deploy to something other than IIS.
What is the purpose of the Community Toolkit project?
The goal of the project is to be a centralized home for extensions and integrations for Aspire, helping to provide consistency in the way that integrations are built and maintained, as well as easier discoverability for users.
How is the Community Toolkit project different from the official Aspire project?
The Aspire Community Toolkit is a community-driven project that's maintained by the community and isn't officially supported by the Aspire team. The toolkit is a collection of integrations and extensions that are built on top of the Aspire project.
How can I contribute to the Community Toolkit project?
Anyone can contribute to the Aspire Community Toolkit and before you get started, be sure to read the Contributing Guide to learn how to contribute to the project.
Should I propose a new integration on the Community Toolkit or the `dotnet/aspire` repo?
If you have an idea for a new integration, you should propose it on the Aspire Community Toolkit repository, rather than dotnet/aspire, as the official Aspire project is focused on the core functionality of the Aspire project.
If you've proposed an integration on the dotnet/aspire repository, you can still propose it in the Community Toolkit, but link to the existing issue on the dotnet/aspire repository to provide context.
How can I find Community Toolkit integrations?
Integrations from the Aspire Community Toolkit appear in the Add Aspire Integration dialog in Visual Studio under the namespace CommunityToolkit.Aspire.*.
Next steps
To learn more about networking and functions: