{"id":1914,"date":"2025-04-10T16:20:10","date_gmt":"2025-04-10T16:20:10","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/04\/10\/net-aspire-9-2-is-now-available-with-new-ways-to-deploy\/"},"modified":"2025-04-10T16:20:10","modified_gmt":"2025-04-10T16:20:10","slug":"net-aspire-9-2-is-now-available-with-new-ways-to-deploy","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/04\/10\/net-aspire-9-2-is-now-available-with-new-ways-to-deploy\/","title":{"rendered":".NET Aspire 9.2 is Now Available with New Ways to Deploy"},"content":{"rendered":"<p>It\u2019s spring in Washington, and it\u2019s time for another .NET Aspire release! We\u2019re so excited to share the <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/whats-new\/dotnet-aspire-9.2\">.NET Aspire 9.2 release<\/a>, full of new features for our dashboard and some new tools that are going to help you. We\u2019re also introducing a new type of integration called <strong>publishers<\/strong> to help you deploy your .NET Aspire applications to more places. Let\u2019s take a look at some highlights in .NET Aspire 9.2, and share some news.<\/p>\n<p>NOTE: If you use .NET Aspire to deploy Azure SQL Server or Azure PostgreSQL, there is a breaking change in 9.2. See <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/dotnet-aspire-92-is-now-available-with-new-ways-to-deploy\/#breaking-change-for-azure-sql-server-and-azure-postgresql\">below<\/a> for details.<\/p>\n<h2>Thoughtworks adds .NET Aspire to its Technology Radar in April 2025<\/h2>\n<p>Before we dive into release details, we want to share that <a href=\"https:\/\/www.thoughtworks.com\/\">Thoughtworks<\/a>, a globally recognized technology consultant firm, has added .NET Aspire to their <a href=\"https:\/\/www.thoughtworks.com\/radar\/languages-and-frameworks\/net-aspire\">Technology Radar<\/a> 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\u2019 experience and highlights things technologists may want to explore on your projects.<\/p>\n<p>We\u2019re 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\u2019re growing the .NET Aspire tools.<\/p>\n<h2>Update to 9.2 with ease<\/h2>\n<p>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:<\/p>\n<p>Modify your app host project file so that the SDK version is 9.2<\/p>\n<p>&lt;Project Sdk=&#8221;Microsoft.NET.Sdk&#8221;&gt;<\/p>\n<p>    &lt;Sdk Name=&#8221;Aspire.AppHost.Sdk&#8221; Version=&#8221;9.2.0&#8243; \/&gt;<br \/>\n    &lt;!&#8211; omitted for brevity &#8211;&gt;<\/p>\n<p>If you are using Visual Studio, restart Visual Studio so that the SDK version is picked up and used for your project.<br \/>\nUpdate the Aspire.* NuGet packages in your app host and service defaults projects to the version 9.2.<\/p>\n<p>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 <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/whats-new\/dotnet-aspire-9.2\">.NET Aspire documentation<\/a>.<\/p>\n<h2>Dashboard Features for Everyone<\/h2>\n<p>With each release of .NET Aspire, we improve the dashboard to give you more control and more insight into your application. This time, we\u2019ve got three new features to introduce that are going to help everyone with their applications.<\/p>\n<h3>Introducing the .NET Aspire Resource Graph<\/h3>\n\n<div class=\"wp-video\"><!--[if lt IE 9]&gt;document.createElement('video');&lt;![endif]--><br \/>\n<a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/04\/resource-graph.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/04\/resource-graph.mp4<\/a><\/div>\n<p>The dashboard started as a simple table showing you the resources managed in your .NET Aspire solution, and we heard you: there\u2019s structure to your solutions that you would like to be able to visualize. Now you can.<\/p>\n<p>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 \u2018Graph\u2019 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.<\/p>\n<h3>Custom Resource URLs<\/h3>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>var web = builder.AddProject&lt;Projects.Web&gt;(&#8220;web&#8221;)<br \/>\n  .WithUrl(&#8220;https:\/\/mywebsite.local&#8221;, &#8220;Local Website&#8221;)<br \/>\n  .WithUrl(&#8220;https:\/\/github.com\/dotnet\/aspire&#8221;, &#8220;.NET Aspire GitHub Repository&#8221;)<br \/>\n  .WithUrlForEndpoint(&#8220;https&#8221;, u =&gt; u.DisplayText = &#8220;Website&#8221;);<\/p>\n<h3>Resource Deep Linking<\/h3>\n<p>If you\u2019ve 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.<\/p>\n<p>var dbServer = builder.AddPostgres(&#8220;pg-server&#8221;);<\/p>\n<p>dbServer<br \/>\n  .WithDataVolume(&#8220;db-volume&#8221;)<br \/>\n  .WithLifetime(ContainerLifetime.Persistent)<br \/>\n  .WithPgAdmin(config =&gt; config.WithLifetime(ContainerLifetime.Persistent));<\/p>\n<p>var theDb = dbServer.AddDatabase(&#8220;my-app-db&#8221;);<\/p>\n<p>builder.AddProject&lt;Projects.Website&gt;(&#8220;web&#8221;)<br \/>\n  .WithReference(theDb);<\/p>\n<p>This passing of a child resource is called \u201cDeep Linking\u201d 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.<\/p>\n<p>With the 9.2 release, we are introducing deep linking capabilities for a handful of integrations:<\/p>\n<p>Azure Cosmos DB<br \/>\nAzure Service Bus<br \/>\nAzure Event Hubs<br \/>\nAzure OpenAI<br \/>\nAzure Web PubSub<\/p>\n<p>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 <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/whats-new\/dotnet-aspire-9.2\">.NET Aspire documentation<\/a>.<\/p>\n<h3>Custom HTTP Commands Now Built-in<\/h3>\n<p>9.2 introduces a new API for one of the most popular extension methods you write \u2013 WithHttpCommand(). <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/fundamentals\/custom-resource-commands\">Custom commands<\/a> 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.<\/p>\n<h3>Much more<\/h3>\n<p>There are so many tweaks in every dashboard release, it\u2019s impossible to blog about them all \u2013 but James Newton-King has been counting down days to the release by <a href=\"https:\/\/bsky.app\/profile\/james.newtonking.com\/post\/3llinclx2qc2n\">sharing one per day on BlueSky<\/a>! One of our favorites is the ability to <a href=\"https:\/\/bsky.app\/profile\/james.newtonking.com\/post\/3lmg275uhpc2u\">pause log collection via the dashboard<\/a>.<\/p>\n<h2>Publish to Docker Compose with your first Publisher integration<\/h2>\n<p>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 <strong>Publishers<\/strong> to help you write code that will define how your application gets packaged and deployed to another platform.<\/p>\n<p>We\u2019ve worked with <a href=\"https:\/\/github.com\/prom3theu5\">David Sekula<\/a>, the author of the <a href=\"https:\/\/github.com\/prom3theu5\/aspirational-manifests\">Aspir8<\/a> 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:<\/p>\n<p>Docker Compose<br \/>\nKubernetes<br \/>\nAzure<\/p>\n<p>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\u2019s see how easy it is to add publishing for Docker Compose to our default template application:<\/p>\n<p>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.<br \/>\nAdd the following instructions to your app host project\u2019s Program.cs file:<\/p>\n<p>builder.AddDockerComposePublisher();<\/p>\n<p>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 &#8211;prerelease switch is required during this experimental period:<\/p>\n<p>dotnet tool install -g aspire.cli &#8211;prerelease<\/p>\n<p>Once it\u2019s 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.<\/p>\n<p>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.<\/p>\n<p>There is more information about .NET Aspire publishers and how you can write your own publisher in <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/fundamentals\/integrations-overview#publishing-integrations\">the documentation<\/a>.<\/p>\n<h2>Breaking Change for Azure SQL Server and Azure PostgreSQL<\/h2>\n<p>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:<\/p>\n<p><strong>Azure SQL Server<\/strong> \u2013 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.<br \/>\n<strong>Azure PostgreSQL<\/strong> \u2013 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.<\/p>\n<p>See the <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/compatibility\/9.2\/index.md\">breaking changes<\/a> documentation for more details.<\/p>\n<h2>Summary<\/h2>\n<p>Thank you to everyone who contributed to this release by filing issues, fixing bugs, and contributing features. We especially want to call out <a href=\"https:\/\/github.com\/afscrome\">afscrome<\/a>, <a href=\"https:\/\/github.com\/Alirexaa\">alirexaa<\/a>, and of course David aka <a href=\"https:\/\/github.com\/prom3theu5\">prom3theu5<\/a> for all of the improvements you made this release!<\/p>\n<p>.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 <a href=\"https:\/\/twitch.tv\/visualstudio\">Twitch<\/a> 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.<\/p>\n\n<p>The post <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/dotnet-aspire-92-is-now-available-with-new-ways-to-deploy\/\">.NET Aspire 9.2 is Now Available with New Ways to Deploy<\/a> appeared first on <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\">.NET Blog<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>It\u2019s spring in Washington, and it\u2019s time for another .NET Aspire release! We\u2019re so excited to share the .NET Aspire [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1914","post","type-post","status-publish","format-standard","hentry","category-dotnet"],"_links":{"self":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/1914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/comments?post=1914"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/1914\/revisions"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=1914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=1914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=1914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}