{"id":58295,"date":"2025-09-25T10:25:00","date_gmt":"2025-09-25T17:25:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=58295"},"modified":"2025-11-24T14:16:08","modified_gmt":"2025-11-24T22:16:08","slug":"announcing-dotnet-aspire-95","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-aspire-95\/","title":{"rendered":"Announcing Aspire 9.5"},"content":{"rendered":"<blockquote>\n<p>Aspire has gone polyglot! Explore the new <a href=\"https:\/\/aspire.dev\">Aspire.dev<\/a> and <a href=\"https:\/\/devblogs.microsoft.com\/aspire\/\">learn<\/a> about the new unified, open-source platform for building, observing, and deploying distributed apps in any language.<\/p>\n<\/blockquote>\n<p>Aspire 9.5 is here with exciting new features and improvements that enhance the developer experience for building distributed applications.<\/p>\n<p><em>For the complete list of changes and technical details, visit the <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/whats-new\/dotnet-aspire-9-5\">official Aspire 9.5 release notes<\/a>.<\/em><\/p>\n<p>Let&#8217;s dive into the key highlights of this release.<\/p>\n<h2>Upgrading to Aspire 9.5<\/h2>\n<p>You can install the Aspire CLI at the command-line with these commands:<\/p>\n<pre><code class=\"language-bash\"># Bash\ncurl -sSL https:\/\/aspire.dev\/install.sh | bash\n\n# PowerShell\niex \"&amp; { $(irm https:\/\/aspire.dev\/install.ps1) }\"<\/code><\/pre>\n<p>Be sure to get the latest version of the Aspire templates as well:<\/p>\n<pre><code class=\"language-bash\">dotnet new install Aspire.ProjectTemplates<\/code><\/pre>\n<p>One of the most exciting additions in Aspire 9.5 is the new <strong><code>aspire update<\/code> command<\/strong> (in preview), which simplifies the upgrade process significantly. This intelligent command can automatically detect and update your AppHost packages and Aspire client integrations.<\/p>\n<p>This preview command:<\/p>\n<ul>\n<li><strong>Updates your SDK and AppHost packages<\/strong> automatically<\/li>\n<li><strong>Validates package compatibility<\/strong> before applying changes<\/li>\n<li><strong>Supports channel awareness<\/strong> &#8211; choose stable, daily, or custom builds<\/li>\n<li><strong>Asks for confirmation<\/strong> before making changes<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/aspire-update.gif\" alt=\"Update an app with the aspire update command\" \/><\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Preview Feature<\/strong><\/p>The <code>aspire update<\/code> command is in preview and may change before general availability.  We recommend using version control and inspecting changes after running it. Share your feedback about this feature on <a href=\"https:\/\/github.com\/dotnet\/aspire\/issues\">GitHub<\/a>!\n<\/div>\n<div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Updating from Aspire 8<\/strong><\/p>\nIf you&#8217;re still on Aspire 8, follow the <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/get-started\/upgrade-to-aspire-9\">upgrade guide to Aspire 9<\/a> first, then upgrade to 9.5.\n<\/div><\/p>\n<h2>Enhanced CLI Experience<\/h2>\n<p>Aspire 9.5 brings significant improvements to the command-line experience, making it more powerful and user-friendly for developers.<\/p>\n<h2>Single-File AppHost Approach (Preview)<\/h2>\n<p>One of the most revolutionary features in Aspire 9.5 is the <strong>file-based AppHost support<\/strong> &#8211; a preview feature that introduces support for .NET 10&#8217;s new file-based apps. This means you can now create an Aspire AppHost with <strong>just one file and no project file needed<\/strong>!  New and existing applications built with an AppHost project will continue to be supported.<\/p>\n<h3>What is File-Based AppHost?<\/h3>\n<p>The traditional Aspire AppHost requires a <code>.csproj<\/code> file and multiple files to get started. With file-based AppHost, you can define your entire distributed application in a single <code>apphost.cs<\/code> file.  This builds on the work we&#8217;re delivering with <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-run-app\/\">.NET 10 that enables single-file applications<\/a>.<\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Enable the Preview Feature<\/strong><\/p>\nThis feature is currently behind a feature flag and requires .NET SDK 10.0.100 RC1 or later:<\/p>\n<pre><code class=\"language-bash\"># Enable file-based AppHost support\naspire config set features.singlefileAppHostEnabled true<\/code><\/pre>\n<p><\/div><\/p>\n<p>You can then use the <code>aspire new<\/code> command to create a new, blank file-based apphost with this content:<\/p>\n<pre><code class=\"language-csharp\">#:sdk Aspire.AppHost.Sdk@9.5.0\n\nvar builder = DistributedApplication.CreateBuilder(args);\n\nbuilder.Build().Run();<\/code><\/pre>\n<p>Additionally, an <code>apphost.run.json<\/code> file will be written with launch profiles for your favorite code-editor to use.<\/p>\n<h3>Adding Resources and Projects to Your File-Based AppHost<\/h3>\n<p>Start adding integrations with <code>aspire add<\/code> and add your other projects with single line directives in your <code>apphost.cs<\/code> file.<\/p>\n<pre><code class=\"language-csharp\">#:sdk Aspire.AppHost.Sdk@9.5.0\n#:project MyBlazorApp\n\nvar builder = DistributedApplication.CreateBuilder(args);\n\n\/\/ Add an ASP.NET Core project\nbuilder.AddProject&lt;Projects.MyBlazorApp&gt;(\"web\");\n\nbuilder.Build().Run();<\/code><\/pre>\n<p>We can then add Redis to our growing web application by executing the command:<\/p>\n<pre><code class=\"language-bash\">aspire add Aspire.Hosting.Redis<\/code><\/pre>\n<p>Then adding the appropriate <code>AddRedis<\/code> statement and <code>WithReference<\/code> methods in the <code>AppHost.cs<\/code> file:<\/p>\n<pre><code class=\"language-csharp\">#:sdk Aspire.AppHost.Sdk@9.5.0\n#:package Aspire.Hosting.Redis@9.4.2\n#:project MyBlazorApp\n\nvar builder = DistributedApplication.CreateBuilder(args);\n\nvar cache = builder.AddRedis(\"cache\");\n\nbuilder.AddProject&lt;Projects.MyBlazorApp&gt;(\"web\")\n    .WithReference(cache)\n    .WaitForStart(cache);\n\nbuilder.Build().Run();<\/code><\/pre>\n<p>This approach reduces the complexity of the Aspire configuration, especially for folks outside of the .NET ecosystem, without comprimising the full power of .NET.  New users to Aspire can get started in seconds and can augment their existing applications with 1 command and 1 file.  Learn more about file-based applications in our <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-dotnet-run-app\/\">announcement blog post<\/a>.<\/p>\n<h2>Dashboard Enhancements<\/h2>\n<p>The Aspire Dashboard receives major usability and functionality improvements in version 9.5, making it even more powerful for monitoring and debugging distributed applications.<\/p>\n<h3>Multi-Resource Console Logs<\/h3>\n<p>A game-changing addition is the new <strong>&#8220;All&#8221; option in console logs<\/strong> that streams logs from every running resource simultaneously with color-coded prefixes so that you can see the various services that generated the log entries.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/dashboard-console-logs-all.webp\" alt=\"All console logs in one screen\" \/><\/p>\n<p>This unified view makes it much easier to understand the interactions between different services in your application.<\/p>\n<h3>New LLM Insights<\/h3>\n<p>Aspire 9.5 introduces the GenAI visualizer, which collates, summarizes, and visualizes LLM-centric calls within your app:<\/p>\n<ul>\n<li>Explore input and output messages.<\/li>\n<li>JSON\/XML payloads highlighted and indented.<\/li>\n<li>Preview Markdown and multimodal content (for example, images).<\/li>\n<\/ul>\n<p>When the dashboard detects AI telemetry, a sparkle icon (\u2728) is presented that will allow you to explore the interaction with the LLM.  You&#8217;ll be able to see the prompts, responses, and even images returned from the LLM in the visualizer.<\/p>\n<p>The GenAI telemetry conventions are evolving rapidly and we will update this feature to stay compatible.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/dashboard-genai-visualizer.gif\" alt=\"New Visualizer for AI telemetry\" \/><\/p>\n<h2>New and Updated Integrations<\/h2>\n<p>Aspire 9.5 introduces several new integrations and significantly enhances existing ones, making it easier to work with AI services, cloud resources, and development tools.<\/p>\n<h3>OpenAI Hosting Integration<\/h3>\n<p>The new <strong><code>AddOpenAI<\/code> integration<\/strong> provides first-class support for modeling OpenAI endpoints and their associated models within your Aspire application.<\/p>\n<pre><code class=\"language-csharp\">var builder = DistributedApplication.CreateBuilder(args);\n\nvar apiKey = builder.AddParameter(\"openai-api-key\", secret: true);\n\nvar openai = builder.AddOpenAI(\"openai\")\n    .WithApiKey(apiKey)\n    .WithEndpoint(\"https:\/\/api.openai.com\");\n\nvar chatModel = openai.AddModel(\"chat\", \"gpt-4o-mini\");\n\nvar api = builder.AddProject&lt;Projects.Api&gt;(\"api\")\n    .WithReference(chatModel);\n\nbuilder.Build().Run();<\/code><\/pre>\n<p>Additionally, we are introducing support for a <strong>strongly-typed catalog for GitHub-hosted models<\/strong>.  This gives you intellisense support for the catalog of GitHub-hosted models that you can use.<\/p>\n<pre><code class=\"language-csharp\">var apiKey = builder.AddParameter(\"githubApiKey\", secret: true);\n\nvar gpt5mini = builder.AddGitHubModel(\"gpt5mini\", GitHubModel.OpenAI.OpenAIGpt5Mini)\n   .WithApiKey(apiKey);\nvar gpt5 = builder.AddGitHubModel(\"gpt5\", GitHubModel.OpenAI.OpenAIGpt5)\n   .WithApiKey(apiKey);\nvar mistral = builder.AddGitHubModel(\"mistral\", GitHubModel.MistralAI.MistralLarge2411)\n   .WithApiKey(apiKey);\n\nbuilder.AddProject&lt;Projects.MyBlazorApp&gt;(\"web\")\n   .WithReference(gpt5mini)\n   .WithReference(gpt5)\n   .WithReference(mistral)\n   .WithReference(cache)\n   .WaitForStart(cache);<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2025\/11\/dashboard-with-models.webp\" alt=\"Dashboard showing the GitHub models connected\" \/><\/p>\n<h3>Dev Tunnels Hosting Integration<\/h3>\n<p>Aspire 9.5 introduces <strong>first-class support for <a href=\"https:\/\/learn.microsoft.com\/azure\/developer\/dev-tunnels\/overview\">Azure Dev Tunnels<\/a><\/strong>.  <\/p>\n<p>As a developer, this allows you to securely share your application running on your workstation with the outside network.  You can test webhooks from public services, quickly get feedback from customers, and even test interactions from a mobile device using DevTunnels<\/p>\n<pre><code class=\"language-csharp\">var builder = DistributedApplication.CreateBuilder(args);\n\n\/\/ Add a basic Dev Tunnel resource (default: private access)\nvar tunnel = builder.AddDevTunnel(\"dev-tunnel\")\n    .WithAnonymousAccess();\n\n\/\/ Add your web application\nvar webApp = builder.AddProject&lt;Projects.WebApp&gt;(\"webapp\");\n\n\/\/ Connect the tunnel to the web application endpoint\ntunnel.WithReference(webApp.GetEndpoint(\"http\"));\n\nbuilder.Build().Run();<\/code><\/pre>\n<p>The Dev Tunnels integration automatically handles Azure authentication, tunnel lifecycle management, and provides public or private URLs (depending on configuration) to connected resources, making it easy to expose local development services securely to external consumers. Dev Tunnels also improves support for mobile dev, such as .NET MAUI, making it easy to launch both your backend and mobile app at once without complex dev-time config.<\/p>\n<h3>YARP Static Files Support<\/h3>\n<p>Aspire 9.5 adds <strong>comprehensive static file serving capabilities<\/strong> to the <a href=\"https:\/\/learn.microsoft.com\/aspnet\/core\/fundamentals\/servers\/yarp\/yarp-overview\">YARP<\/a> integration, enabling you to serve static assets directly from YARP alongside reverse proxy functionality.<\/p>\n<pre><code class=\"language-csharp\">var builder = DistributedApplication.CreateBuilder(args);\n\n\/\/ Enable static file serving (serves from wwwroot folder)\nvar yarp = builder.AddYarp(\"gateway\")\n    .WithStaticFiles();\n\nbuilder.Build().Run();<\/code><\/pre>\n<p>This update enables direct static file serving from YARP, allowing applications to deliver HTML, CSS, JavaScript, and other assets efficiently. You can choose flexible source options, such as bind mounting local directories or utilizing Docker multi-stage builds, to suit your workflow. The static file support works reliably in both development and production environments, streamlining deployment and day-to-day operations.<\/p>\n<p>The following example demonstrates how YARP can be configured to serve static files from a frontend &#8216;dist&#8217; directory while also proxying API requests to a backend service. This approach streamlines resource management and routing within distributed applications.<\/p>\n<pre><code class=\"language-csharp\">var backendApi = builder.AddProject&lt;Projects.Api&gt;(\"api\");\n\n\/\/ YARP serves static files AND proxies API requests\nvar gateway = builder.AddYarp(\"app-gateway\")\n    .WithStaticFiles(\".\/frontend\/dist\")\n    .WithConfiguration(yarp =&gt;\n    {\n        \/\/ API routes\n        yarp.AddRoute(\"\/api\/{**catch-all}\", backendApi)\n            .WithTransformPathRemovePrefix(\"\/api\");\n\n        \/\/ Static files are served for all other routes\n    });<\/code><\/pre>\n<h2>Get Started Now<\/h2>\n<p>Ready to try Aspire 9.5?  Install the new CLI and try the <code>aspire update<\/code> command on your projects.<\/p>\n<p>The Aspire team wants to hear from you about the future of the framework, what you like, and what you&#8217;d like to see improved. If you have feedback, questions, or want to contribute:<\/p>\n<ul>\n<li><strong>GitHub<\/strong>: Collaborate with the team on <a href=\"https:\/\/github.com\/dotnet\/aspire\">GitHub<\/a><\/li>\n<li><strong>Discord<\/strong>: Join the community on <a href=\"https:\/\/aka.ms\/aspire-discord\">Discord<\/a> to chat with the team and other developers<\/li>\n<li><strong>Documentation<\/strong>: Explore the comprehensive <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/\">documentation<\/a> for detailed guides and tutorials.<\/li>\n<\/ul>\n<p>For the complete list of changes and technical details, visit the <a href=\"https:\/\/learn.microsoft.com\/dotnet\/aspire\/whats-new\/dotnet-aspire-9-5\">official Aspire 9.5 release notes<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Aspire 9.5 adds the preview &#8216;aspire update&#8217; command, single-file AppHost, richer CLI and dashboard UX, and new integrations for AI, DevTunnels, and more.<\/p>\n","protected":false},"author":405,"featured_media":58995,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,7783,7689,7237],"tags":[568,7768,7174,7633],"class_list":["post-58295","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-aspire","category-cloud-native","category-containers","tag-ai","tag-aspire","tag-cli","tag-yarp"],"acf":[],"blog_post_summary":"<p>Aspire 9.5 adds the preview &#8216;aspire update&#8217; command, single-file AppHost, richer CLI and dashboard UX, and new integrations for AI, DevTunnels, and more.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/58295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/405"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=58295"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/58295\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58995"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=58295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=58295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=58295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}