April 10th, 2025

.NET Aspire 9.2 is Now Available with New Ways to Deploy

Jeffrey Fritz
Principal Program Manager

It’s spring in Washington, and it’s time for another .NET Aspire release! We’re so excited to share the .NET Aspire 9.2 release, full of new features for our dashboard and some new tools that are going to help you. We’re also introducing a new type of integration called publishers to help you deploy your .NET Aspire applications to more places. Let’s take a look at some highlights in .NET Aspire 9.2, and share some news.

NOTE: If you use .NET Aspire to deploy Azure SQL Server or Azure PostgreSQL, there is a breaking change in 9.2. See the What’s New for details.

Thoughtworks adds .NET Aspire to its Technology Radar in April 2025

Before we dive into release details, we want to share that Thoughtworks, a globally recognized technology consultant firm, has added .NET Aspire to their Technology Radar report. The Technology Radar is a twice-yearly report of tools, techniques, platforms, languages and frameworks. It is a knowledge-sharing tool based on their global teams’ experience and highlights things technologists may want to explore on your projects.

We’re happy to hear that more developers and organizations are learning about .NET Aspire. Thank you to the team at Thoughtworks for considering .NET Aspire, and we think you will like how we’re growing the .NET Aspire tools.

Update to 9.2 with ease

Updating to 9.2 is an incremental update from .NET Aspire 9.1 and works with .NET 8 and .NET 9. You can update with the following steps:

  1. Modify your app host project file so that the SDK version is 9.2
<Project Sdk="Microsoft.NET.Sdk">

    <Sdk Name="Aspire.AppHost.Sdk" Version="9.2.0" />
    <!-- omitted for brevity -->
  1. If you are using Visual Studio, restart Visual Studio so that the SDK version is picked up and used for your project.
  2. Update the Aspire.* NuGet packages in your app host and service defaults projects to the version 9.2.

Restore packages, and your application should be using the .NET Aspire 9.2 version. Further details, including some optional updates can be found in the .NET Aspire documentation.

Dashboard Features for Everyone

With each release of .NET Aspire, we improve the dashboard to give you more control and more insight into your application. This time, we’ve got three new features to introduce that are going to help everyone with their applications.

Introducing the .NET Aspire Resource Graph

The dashboard started as a simple table showing you the resources managed in your .NET Aspire solution, and we heard you: there’s structure to your solutions that you would like to be able to visualize. Now you can.

The Resource Graph shows you a view of all of the resources defined in the app host and how they relate to each other. Click the new ‘Graph’ link at the top of the Resources panel to explore your resources in this cool new model. The icons and colors shown in the graph match those used in the new icons on the table view, plus the colors in the traces and logs views.

Custom Resource URLs

Do you have some custom URLs with domain names mapped locally for your development environment? Maybe you have some entries in a hosts file to make your workstation appear to be serving another address.

You can now add these extra URLs to the definition of your resources in the AppHost project. .NET Aspire will not configure your hosts file for these entries, but it will make the values visible on the dashboard.

var web = builder.AddProject<Projects.Web>("web")
  .WithUrl("https://mywebsite.local", "Local Website")
  .WithUrl("https://github.com/dotnet/aspire", ".NET Aspire GitHub Repository")
  .WithUrlForEndpoint("https", u => u.DisplayText = "Website");

Resource Deep Linking

If you’ve used the .NET Aspire integrations for a number of database integrations like Postgres, MySQL, or SQL Server you know that you can pass a reference to a database instance into your application to generate the appropriate connection string to access that resource.

var dbServer = builder.AddPostgres("pg-server");

dbServer
  .WithDataVolume("db-volume")
  .WithLifetime(ContainerLifetime.Persistent)
  .WithPgAdmin(config => config.WithLifetime(ContainerLifetime.Persistent));

var theDb = dbServer.AddDatabase("my-app-db");

builder.AddProject<Projects.Website>("web")
  .WithReference(theDb);

This passing of a child resource is called “Deep Linking” and was also possible with Azure Storage. You could pass references to queues, tables, or blog storage into projects and get their appropriate connection strings.

With the 9.2 release, we are introducing deep linking capabilities for a handful of integrations:

  • Azure Cosmos DB
  • Azure Service Bus
  • Azure Event Hubs
  • Azure OpenAI
  • Azure Web PubSub

This enhancement allows you to connect an application directly to that CosmosDb database or that Azure Service Bus Topic. More details are available in the .NET Aspire documentation.

Custom HTTP Commands Now Built-in

9.2 introduces a new API for one of the most popular extension methods you write – WithHttpCommand(). Custom commands can use the API to define a resource command that sends an HTTP request to your app from the dashboard, making it easy to perform common development tasks like seeding a DB or clearing a cache.

Much more

There are so many tweaks in every dashboard release, it’s impossible to blog about them all – but James Newton-King has been counting down days to the release by sharing one per day on BlueSky! One of our favorites is the ability to pause log collection via the dashboard.

Publish to Docker Compose with your first Publisher integration

Since the beginning of .NET Aspire, we know that developers have wanted to be able to deploy their applications and their containers to a number of destinations, and none more so than Docker Compose or Kubernetes. With .NET Aspire 9.2, we are introducing Publishers to help you write code that will define how your application gets packaged and deployed to another platform.

We’ve worked with David Sekula, the author of the Aspir8 tool, to build that functionality into .NET Aspire as publishers so that everyone can use them without having to install a separate tool. This means that you can use .NET Aspire to publish to the following locations:

  • Docker Compose
  • Kubernetes
  • Azure

These publishers are in a preview state with 9.2, and you can try them out in your .NET Aspire solution. Publishers are either standalone Hosting integrations or built-in to Hosting integrations with other functionality. Let’s see how easy it is to add publishing for Docker Compose to our default template application:

  1. Add the Aspire.Hosting.Docker NuGet package to your app host project. At the time of this article, it will be a preview version of this package.
  2. Add the following instructions to your app host project’s Program.cs file:
builder.AddDockerComposePublisher();

To build the assets for a publisher, you can use the new experimental .NET Aspire CLI, which is currently available as a global tool. Note that the --prerelease switch is required during this experimental period:

dotnet tool install -g aspire.cli --prerelease

Once it’s set up, simply run aspire publish in the folder where your app host project is. A series of prompts will appear at the command-line to step you through the process of publication.

You will now find a docker-compose.yaml file in your app host folder along with a .env file that contains information about passwords for resources and names of images to use to start your containers with Docker.

There is more information about .NET Aspire publishers and how you can write your own publisher in the documentation.

Breaking Change for Azure SQL Server and Azure PostgreSQL

When deploying to Azure Container Apps with .NET Aspire 9.2, each Azure Container App now gets its own managed identity by default. In previous .NET Aspire versions, Azure Container Apps shared a single identity. This is a breaking behavioral change, and may impact apps using:

  • Azure SQL Server – Azure SQL only supports one Azure AD admin. With multiple identities, only the last deployed app will be granted admin access by default. Other apps will need explicit users and role assignments.
  • Azure PostgreSQL – The app that creates the database becomes the owner. Other apps (like those running migrations or performing data operations) will need explicit GRANT permissions to access the database correctly.

See the breaking changes documentation for more details.

Summary

Thank you to everyone who contributed to this release by filing issues, fixing bugs, and contributing features. We especially want to call out afscrome, alirexaa, and of course David aka prom3theu5 for all of the improvements you made this release!

.NET Aspire continues to grow, improve, and add new features. We encourage you to update your applications to .NET Aspire 9.2 and try out the updates to the dashboard as well as the new publisher features. The team is hosting a .NET Aspire 9.2 Release Party on YouTube and Twitch that you can participate in on April 10th at 9a PT. We hope to see you there and the team will answer your questions about the new release.

Author

Jeffrey Fritz
Principal Program Manager

Jeff Fritz is a principal program manager in Microsoft’s Developer Division working on the .NET Community Team. Four days a week, you can catch Jeff hosting a live video stream called 'Fritz and Friends' at live.jeffreyfritz.com.

2 comments

  • Weihan Li 1 week ago

    Is it possible to move the `Aspire.AppHost.Sdk` version into Directory.Packages.props

  • Harlow Burgess 2 weeks ago

    The ‘breaking changes’ link is… broken (chuckle).