Frequently asked questions about .NET Aspire

This article lists frequently asked questions about .NET Aspire. For a more comprehensive overview, see .NET Aspire overview.

Why use .NET Aspire for orchestration when I can use Docker Compose?

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 .NET 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. .NET Aspire produces a better experience that's easy to get started and scales up to an orchestrator like Compose using a real programming language.

Why would I use .NET Aspire service discovery when Docker Compose has it built in and works with Kubernetes?

.NET 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.

OpenTelemetry is something that can already be used in .NET. Why would I use .NET Aspire?

.NET Aspire takes a big bet on .NET's integration with OpenTelemetry. The .NET 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.

Observability tools such as Grafana, Jaeger, and Prometheus work with .NET. Why bother with .NET Aspire?

.NET Aspire isn't a replacement for these tools, but rather a complementary technology. .NET 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 .NET Aspire sample repository that shows Grafana and Prometheus.

Why is there a need for yet another framework to do what's already being done very well by everyone else?

.NET Aspire isn't a framework. 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. .NET 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 .NET 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.

When will .NET Aspire be released?

.NET Aspire is now in its preview release phase, with monthly updates expected until the product reaches general availability (GA). The official release is planned for the first half of 2024. Stay updated by checking the official .NET Aspire repository for more information.

What's the difference between .NET Aspire and Microsoft Orleans?

Microsoft Orleans and .NET Aspire are complementary technologies.

Orleans is a distributed actor-based framework. .NET 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 .NET Aspire can be used for orchestration purposes.

For more information, see Use Orleans with .NET Aspire and the corresponding Orleans voting app sample.

What's the difference between .NET Aspire and Dapr?

Dapr and .NET Aspire are complementary technologies.

Where Dapr abstracts some of the underlying cloud platform, .NET Aspire provides opinionated configuration around the underlying cloud technologies without abstracting them. A .NET-based application that uses Dapr can use .NET Aspire to orchestrate the local developer inner loop and streamline deployment. .NET Aspire includes extensions that support the launching of Dapr side-car processes during the inner loop.

For more information, see Use Dapr with .NET Aspire and the corresponding Dapr sample app in the .NET Aspire sample repository.

What's the difference between .NET Aspire and Project Tye?

Project Tye was an experiment which explored the launching and orchestration of micro-services and support deployment into orchestrators such as Kubernetes. .NET Aspire is a superset of Tye which includes the orchestration and deployment capabilities along with opinionated components for integrating common cloud-native dependencies. .NET Aspire can be considered the evolution of the Project Tye experiment.

What's the relationship between .NET Aspire and the Azure SDK for .NET?

.NET 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.

What's the relationship between .NET Aspire and Kubernetes?

.NET 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. .NET Aspire applications can produce a manifest that tool authors can use to produce artifacts for deployment to Kubernetes. In essence, Kubernetes is a deployment target for .NET Aspire applications.

Are worker services supported in .NET Aspire?

Due to a deployment related bug, preview 1 of .NET Aspire doesn't support deployment of worker services.

As a workaround consider deploying a web application as a worker which is not exposed to the internet. We are currently tracking this issue and plan to have it resolved for preview 2 (see GitHub issue).

Are Azure Functions supported in .NET Aspire?

We have no specific support for Azure Functions in preview 1 of .NET Aspire however it's a target execution environment for deployment that we are planning to support in future previews.

Next steps

To learn more about networking and functions: