From f53f634cdeb5e92f33de4ae7cc2224d28954f567 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:33:23 +0000 Subject: [PATCH 1/4] Initial plan From 4fb0b71e73499cd5533742879841026905ac9ed0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:36:40 +0000 Subject: [PATCH 2/4] Add Upgrade Aspire article and update sidebar configuration Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> --- src/frontend/config/sidebar/docs.topics.ts | 24 +- .../content/docs/whats-new/upgrade-aspire.mdx | 365 ++++++++++++++++++ 2 files changed, 388 insertions(+), 1 deletion(-) create mode 100644 src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx diff --git a/src/frontend/config/sidebar/docs.topics.ts b/src/frontend/config/sidebar/docs.topics.ts index dbbf52c7..167d4c21 100644 --- a/src/frontend/config/sidebar/docs.topics.ts +++ b/src/frontend/config/sidebar/docs.topics.ts @@ -74,7 +74,7 @@ export const docsTopics: StarlightSidebarTopicsUserConfig = { 'pt-PT': 'Versões anteriores', ru: 'Предыдущие версии', tr: 'Önceki sürümler', - uk: 'Попередні версії', + uk: 'Попeredні версії', 'zh-CN': '以前的版本', }, items: [ @@ -104,6 +104,28 @@ export const docsTopics: StarlightSidebarTopicsUserConfig = { }, ], }, + { + label: 'Upgrade Aspire', + slug: 'whats-new/upgrade-aspire', + translations: { + da: 'Opgrader Aspire', + de: 'Aspire aktualisieren', + en: 'Upgrade Aspire', + es: 'Actualizar Aspire', + fr: 'Mettre à jour Aspire', + hi: 'Aspire अपग्रेड करें', + id: 'Tingkatkan Aspire', + it: 'Aggiorna Aspire', + ja: 'Aspire をアップグレード', + ko: 'Aspire 업그레이드', + 'pt-BR': 'Atualizar Aspire', + 'pt-PT': 'Atualizar Aspire', + ru: 'Обновить Aspire', + tr: "Aspire'ı Yükselt", + uk: 'Оновити Aspire', + 'zh-CN': '升级 Aspire', + }, + }, ], translations: { da: 'Hvad er nyt', diff --git a/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx b/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx new file mode 100644 index 00000000..55a39c0e --- /dev/null +++ b/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx @@ -0,0 +1,365 @@ +--- +title: Upgrade Aspire +description: Learn how to upgrade your Aspire projects to the latest version. +sidebar: + label: Upgrade Aspire + order: 100 +tableOfContents: + minHeadingLevel: 2 + maxHeadingLevel: 3 +--- + +import { Aside, Steps, Tabs, TabItem, Code } from '@astrojs/starlight/components'; +import LearnMore from '@components/LearnMore.astro'; +import PivotSelector from '@components/PivotSelector.astro'; +import Pivot from '@components/Pivot.astro'; +import OsAwareTabs from '@components/OsAwareTabs.astro'; + +In this article, you learn the steps involved in updating your existing Aspire projects to the latest version. The easiest way to upgrade Aspire is using the **Aspire CLI** with the `aspire update` command. + + + + + +## Prerequisites + +Before you upgrade your projects, ensure that you have the following prerequisites: + +- [Install the latest tooling](/get-started/setup-and-tooling/) +- [Use the Aspire SDK](/fundamentals/dotnet-aspire-sdk/) +- If you have a version of Aspire older than 9.0, [remove the legacy workload](#remove-the-aspire-workload-first-time-upgrades-from-version-8-only) + +## Upgrade using the Aspire CLI + +The recommended way to upgrade Aspire is using the Aspire CLI. This method handles all the necessary updates automatically. + +### Update the Aspire CLI + +First, update the Aspire CLI to the latest version: + + + +```bash title="Bash" +curl -sSL https://aspire.dev/install.sh | bash +``` + +```powershell title="PowerShell" +Invoke-RestMethod -Uri "https://aspire.dev/install.ps1" | Invoke-Expression +``` + + + +### Update your Aspire project + +Update your Aspire project using the `aspire update` command: + +```bash +aspire update +``` + +This command will: + +- Update the `Aspire.AppHost.Sdk` version in your AppHost project +- Update all Aspire NuGet packages to the latest version +- Handle dependency resolution automatically +- Support both regular projects and Central Package Management (CPM) + +### Update your Aspire templates + +Install the latest Aspire project templates by running this command: + +```bash +dotnet new install Aspire.ProjectTemplates +``` + + + +## AppHost template updates + +Recent versions of Aspire have introduced a simplified AppHost project template structure. The SDK now encapsulates the `Aspire.Hosting.AppHost` package, resulting in cleaner project files. + +### Before (9.x and earlier) + +```xml + + + + + + Exe + net9.0 + enable + enable + 1bf2ca25-7be4-4963-8782-c53a74e10ad9 + + + + + + + + + + + + + +``` + +### After (13.0 and later) + +```xml + + + + Exe + net10.0 + enable + enable + 1bf2ca25-7be4-4963-8782-c53a74e10ad9 + + + + + + + + + + + + +``` + +### Key changes + +- **Simplified SDK declaration**: The SDK is now specified directly in the `` tag with its version: `Sdk="Aspire.AppHost.Sdk/13.0.0"` +- **No explicit Aspire.Hosting.AppHost reference**: The SDK now automatically includes this package, reducing boilerplate +- **Cleaner structure**: Removed the separate `` element and the `Microsoft.NET.Sdk` base SDK +- **Target framework**: Updated to the latest .NET version (e.g., from `net9.0` to `net10.0`) + +The `aspire update` command automatically handles this migration when upgrading. + +## Single-file AppHosts + + + +The same project as a file-based AppHost: + +```csharp title="apphost.cs" +#:sdk Aspire.AppHost.Sdk@13.0.0 +#:package Aspire.Hosting.Redis@13.0.0 + +var builder = DistributedApplication.CreateBuilder(args); + +var cache = builder.AddRedis("cache"); +var api = builder.AddProject("apiservice", "../MyApi") + .WithReference(cache); + +builder.Build().Run(); +``` + +No project file needed—just a single _.cs_ file with package references declared using `#:package` directives. + + + +## Manually upgrade a solution + +If you prefer to manually upgrade your projects, you can update your project files directly. The following steps guide you through the process: + +- Edit your [AppHost](/get-started/app-host/) project file to use the latest Aspire SDK +- Update the NuGet packages in your project files to the latest versions +- Adjust your code to address any breaking changes + +### Edit your AppHost project file + +To upgrade your AppHost project, update your project file to use the new SDK declaration and remove the explicit `Aspire.Hosting.AppHost` package reference: + +```diff +- ++ + +- + + + Exe +- net9.0 ++ net10.0 + enable + enable +- true + 0afc20a6-cd99-4bf7-aae1-1359b0d45189 + + + +- ++ + + + +``` + + + +### Update the NuGet packages + +To take advantage of the latest updates in your Aspire solution, update all NuGet packages to the latest version. + + + +In Visual Studio, right-click on your solution in **Solution Explorer** and select **Manage NuGet Packages for Solution**. Navigate to the **Updates** tab and select all Aspire packages to update them to the latest version. + + + + + +To update your project packages, use the following .NET CLI command to update Aspire packages to the latest version: + +```bash +dotnet add package Aspire.Hosting.Redis --version 13.0.0 +``` + +When a package reference already exists, the `dotnet add package` command updates the reference to the specified version. + + + + + +To update your project packages, use the following .NET CLI command to update Aspire packages to the latest version: + +```bash +dotnet add package Aspire.Hosting.Redis --version 13.0.0 +``` + +When a package reference already exists, the `dotnet add package` command updates the reference to the specified version. For more information, see [dotnet add package](https://learn.microsoft.com/dotnet/core/tools/dotnet-add-package). + + + + + +## Breaking changes + +With each new version of Aspire, there may be breaking changes. You need to adjust your code to address these changes. + +For information about breaking changes in specific versions, see the release notes for each version in the [What's new](/whats-new/aspire-13-1/) section. + + + +## Use the Upgrade Assistant + +The [Upgrade Assistant](https://learn.microsoft.com/dotnet/core/porting/upgrade-assistant-overview) is a tool that helps upgrade targeted projects to the latest version. If you're new to the Upgrade Assistant, there are two modalities to choose from: + +- [The Visual Studio extension version](https://learn.microsoft.com/dotnet/core/porting/upgrade-assistant-install#visual-studio-extension) +- [The .NET CLI global tool version](https://learn.microsoft.com/dotnet/core/porting/upgrade-assistant-install#net-global-tool) + +Regardless of how you install the Upgrade Assistant, you can use it to upgrade your Aspire projects to the latest version. + + + + + +To upgrade the Aspire AppHost project with Visual Studio, right-click the project in **Solution Explorer** and select **Upgrade**. + + + +The Upgrade Assistant displays a welcome package. Select the **Aspire upgrades** option and follow the prompts to upgrade your project. + + + + + +To upgrade the Aspire AppHost project, ensure that you installed the Upgrade Assistant CLI. Open a terminal session at the root directory of the Aspire AppHost project file, and run the following command: + +```bash +upgrade-assistant upgrade +``` + +The output is interactive, expecting you to select the upgrade type. Choose the **Aspire upgrades** option and follow the prompts to upgrade your project. + + + +## Remove the Aspire workload (first-time upgrades from version 8 only) + +If you're upgrading from Aspire 8 to Aspire 9 or later for the first time, you need to remove the legacy workload. This step is not needed for upgrades between Aspire 9 versions or later. + +Previously the **aspire workload** was required to create and run Aspire projects. But, with Aspire 9 and later the workload is no longer required and should be removed from your .NET environment. + + + + + +1. Find the installation source by opening a terminal and running the `dotnet workload list` command. + + The preceding command lists the workloads installed in the .NET environment. The method used to install Aspire is listed under the **Installation Source** column of the output, and is either _VS_ for Visual Studio or _SDK_ for the .NET SDK. For example, the following snippet indicates that Visual Studio was used to install Aspire: + + ``` + Installed Workload Id Manifest Version Installation Source + -------------------------------------------------------------------- + aspire 8.2.2/8.0.100 VS 17.14.36109.1 + ``` + +2. Remove Aspire 8 based on the installation source: + + + + 1. Open the **Visual Studio Installer** app + 2. **Modify** the installation instance of Visual Studio + 3. Select **Individual Components** + 4. Search for `aspire` + 5. Unselect **Aspire SDK** + 6. Select the **Modify** button to apply the changes + + + Run `dotnet workload uninstall aspire` to remove Aspire. + + + + + +## Verify the upgrade + +As with any upgrade, ensure that the app runs as expected and that all tests pass. Build the solution and look for suggestions, warnings, or errors in the output window—address anything that wasn't an issue before. + +If you encounter any issues, let us know by [filing a GitHub issue](https://github.com/dotnet/aspire/issues/new/choose). + + From 83f4fac96cad71baf296a21d47b61aeab1c32aac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 30 Jan 2026 15:46:00 +0000 Subject: [PATCH 3/4] Fix typo and remove broken link in Upgrade Aspire article Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> --- src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx b/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx index 55a39c0e..1bf4da4d 100644 --- a/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx +++ b/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx @@ -293,7 +293,7 @@ To upgrade the Aspire AppHost project with Visual Studio, right-click the projec If the **Upgrade Assistant** isn't already installed, you'll be prompted to install it. -The Upgrade Assistant displays a welcome package. Select the **Aspire upgrades** option and follow the prompts to upgrade your project. +The Upgrade Assistant displays a welcome page. Select the **Aspire upgrades** option and follow the prompts to upgrade your project. @@ -360,6 +360,5 @@ If you encounter any issues, let us know by [filing a GitHub issue](https://gith links={[ { title: "What's new", href: "/whats-new/aspire-13-1/" }, { title: "Setup and tooling", href: "/get-started/setup-and-tooling/" }, - { title: "Breaking changes", href: "/compatibility/" }, ]} /> From 96ce9020f7d9efd0a7e3ef27a748db1f60de0f80 Mon Sep 17 00:00:00 2001 From: David Pine Date: Fri, 30 Jan 2026 15:56:41 -0600 Subject: [PATCH 4/4] refactor: streamline Upgrade Aspire article and remove legacy content --- .../content/docs/whats-new/upgrade-aspire.mdx | 377 +++--------------- 1 file changed, 65 insertions(+), 312 deletions(-) diff --git a/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx b/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx index 1bf4da4d..45ea2e64 100644 --- a/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx +++ b/src/frontend/src/content/docs/whats-new/upgrade-aspire.mdx @@ -1,364 +1,117 @@ --- title: Upgrade Aspire description: Learn how to upgrade your Aspire projects to the latest version. -sidebar: - label: Upgrade Aspire - order: 100 -tableOfContents: - minHeadingLevel: 2 - maxHeadingLevel: 3 --- -import { Aside, Steps, Tabs, TabItem, Code } from '@astrojs/starlight/components'; +import { Aside, Steps } from '@astrojs/starlight/components'; +import { Kbd } from 'starlight-kbd/components'; import LearnMore from '@components/LearnMore.astro'; -import PivotSelector from '@components/PivotSelector.astro'; -import Pivot from '@components/Pivot.astro'; import OsAwareTabs from '@components/OsAwareTabs.astro'; -In this article, you learn the steps involved in updating your existing Aspire projects to the latest version. The easiest way to upgrade Aspire is using the **Aspire CLI** with the `aspire update` command. +Upgrading Aspire is simple using the **Aspire CLI**. Run `aspire update` and you're done. - - -## Prerequisites - -Before you upgrade your projects, ensure that you have the following prerequisites: - -- [Install the latest tooling](/get-started/setup-and-tooling/) -- [Use the Aspire SDK](/fundamentals/dotnet-aspire-sdk/) -- If you have a version of Aspire older than 9.0, [remove the legacy workload](#remove-the-aspire-workload-first-time-upgrades-from-version-8-only) - -## Upgrade using the Aspire CLI - -The recommended way to upgrade Aspire is using the Aspire CLI. This method handles all the necessary updates automatically. - -### Update the Aspire CLI - -First, update the Aspire CLI to the latest version: - - - -```bash title="Bash" -curl -sSL https://aspire.dev/install.sh | bash -``` - -```powershell title="PowerShell" -Invoke-RestMethod -Uri "https://aspire.dev/install.ps1" | Invoke-Expression -``` +## Upgrade with the Aspire CLI - - -### Update your Aspire project - -Update your Aspire project using the `aspire update` command: - -```bash -aspire update -``` - -This command will: - -- Update the `Aspire.AppHost.Sdk` version in your AppHost project -- Update all Aspire NuGet packages to the latest version -- Handle dependency resolution automatically -- Support both regular projects and Central Package Management (CPM) - -### Update your Aspire templates - -Install the latest Aspire project templates by running this command: + -```bash -dotnet new install Aspire.ProjectTemplates -``` +1. **Update the Aspire CLI** to the latest version: - - -## AppHost template updates + ```bash + aspire update --self + ``` -Recent versions of Aspire have introduced a simplified AppHost project template structure. The SDK now encapsulates the `Aspire.Hosting.AppHost` package, resulting in cleaner project files. + -### Before (9.x and earlier) +2. **Update your Aspire project** by running: -```xml - + ```bash + aspire update + ``` - + This command automatically: - - Exe - net9.0 - enable - enable - 1bf2ca25-7be4-4963-8782-c53a74e10ad9 - + - Updates the `Aspire.AppHost.Sdk` version + - Updates all Aspire NuGet packages to the latest version + - Handles dependency resolution + - Supports both regular projects and Central Package Management (CPM) - - - - + - - - - + +For more information, see [`aspire update` command reference](/reference/cli/commands/aspire-update/). + - -``` +## Upgrade with the Upgrade Assistant CLI -### After (13.0 and later) +The [Upgrade Assistant](https://learn.microsoft.com/dotnet/core/porting/upgrade-assistant-overview) is another option for upgrading Aspire projects. -```xml - + - - Exe - net10.0 - enable - enable - 1bf2ca25-7be4-4963-8782-c53a74e10ad9 - +1. **Install the Upgrade Assistant** (if not already installed): - - - - + ```bash + dotnet tool install -g upgrade-assistant + ``` - - - +2. **Run the upgrade** from your AppHost project directory: - -``` + ```bash + upgrade-assistant upgrade + ``` -### Key changes +3. **Select the Aspire upgrades** option when prompted and follow the interactive prompts. -- **Simplified SDK declaration**: The SDK is now specified directly in the `` tag with its version: `Sdk="Aspire.AppHost.Sdk/13.0.0"` -- **No explicit Aspire.Hosting.AppHost reference**: The SDK now automatically includes this package, reducing boilerplate -- **Cleaner structure**: Removed the separate `` element and the `Microsoft.NET.Sdk` base SDK -- **Target framework**: Updated to the latest .NET version (e.g., from `net9.0` to `net10.0`) + -The `aspire update` command automatically handles this migration when upgrading. +## Update the VS Code extension (optional) -## Single-file AppHosts +If you have the Aspire extension installed, you can update it to get the latest tooling support: - + -The same project as a file-based AppHost: +1. Open VS Code +2. Go to **Extensions** () +3. Search for **.NET Aspire** +4. Click **Update** if an update is available -```csharp title="apphost.cs" -#:sdk Aspire.AppHost.Sdk@13.0.0 -#:package Aspire.Hosting.Redis@13.0.0 + -var builder = DistributedApplication.CreateBuilder(args); + +For more information, see [Aspire extension for VS Code](/get-started/aspire-vscode-extension/). + -var cache = builder.AddRedis("cache"); -var api = builder.AddProject("apiservice", "../MyApi") - .WithReference(cache); +## Breaking changes -builder.Build().Run(); -``` +Review breaking changes for all versions between your current version and the target version. See the release notes in the [What's new](/whats-new/aspire-13-1/) section. -No project file needed—just a single _.cs_ file with package references declared using `#:package` directives. +## Remove the legacy workload (Aspire 8 only) -## Manually upgrade a solution +The legacy **aspire workload** is no longer required and should be removed: -If you prefer to manually upgrade your projects, you can update your project files directly. The following steps guide you through the process: - -- Edit your [AppHost](/get-started/app-host/) project file to use the latest Aspire SDK -- Update the NuGet packages in your project files to the latest versions -- Adjust your code to address any breaking changes - -### Edit your AppHost project file - -To upgrade your AppHost project, update your project file to use the new SDK declaration and remove the explicit `Aspire.Hosting.AppHost` package reference: - -```diff -- -+ - -- - - - Exe -- net9.0 -+ net10.0 - enable - enable -- true - 0afc20a6-cd99-4bf7-aae1-1359b0d45189 - - - -- -+ - - - +```bash +dotnet workload uninstall aspire ``` - - -### Update the NuGet packages - -To take advantage of the latest updates in your Aspire solution, update all NuGet packages to the latest version. - - - -In Visual Studio, right-click on your solution in **Solution Explorer** and select **Manage NuGet Packages for Solution**. Navigate to the **Updates** tab and select all Aspire packages to update them to the latest version. - - - - - -To update your project packages, use the following .NET CLI command to update Aspire packages to the latest version: - -```bash -dotnet add package Aspire.Hosting.Redis --version 13.0.0 -``` - -When a package reference already exists, the `dotnet add package` command updates the reference to the specified version. - - - - - -To update your project packages, use the following .NET CLI command to update Aspire packages to the latest version: - -```bash -dotnet add package Aspire.Hosting.Redis --version 13.0.0 -``` - -When a package reference already exists, the `dotnet add package` command updates the reference to the specified version. For more information, see [dotnet add package](https://learn.microsoft.com/dotnet/core/tools/dotnet-add-package). - - - - - -## Breaking changes - -With each new version of Aspire, there may be breaking changes. You need to adjust your code to address these changes. - -For information about breaking changes in specific versions, see the release notes for each version in the [What's new](/whats-new/aspire-13-1/) section. - - - -## Use the Upgrade Assistant - -The [Upgrade Assistant](https://learn.microsoft.com/dotnet/core/porting/upgrade-assistant-overview) is a tool that helps upgrade targeted projects to the latest version. If you're new to the Upgrade Assistant, there are two modalities to choose from: - -- [The Visual Studio extension version](https://learn.microsoft.com/dotnet/core/porting/upgrade-assistant-install#visual-studio-extension) -- [The .NET CLI global tool version](https://learn.microsoft.com/dotnet/core/porting/upgrade-assistant-install#net-global-tool) - -Regardless of how you install the Upgrade Assistant, you can use it to upgrade your Aspire projects to the latest version. - - - - - -To upgrade the Aspire AppHost project with Visual Studio, right-click the project in **Solution Explorer** and select **Upgrade**. - - - -The Upgrade Assistant displays a welcome page. Select the **Aspire upgrades** option and follow the prompts to upgrade your project. - - - - +## Verify the upgrade -To upgrade the Aspire AppHost project, ensure that you installed the Upgrade Assistant CLI. Open a terminal session at the root directory of the Aspire AppHost project file, and run the following command: +After upgrading, run your application to ensure everything works as expected: -```bash -upgrade-assistant upgrade +```bash title="Run the Aspire application" +aspire run ``` -The output is interactive, expecting you to select the upgrade type. Choose the **Aspire upgrades** option and follow the prompts to upgrade your project. - - - -## Remove the Aspire workload (first-time upgrades from version 8 only) - -If you're upgrading from Aspire 8 to Aspire 9 or later for the first time, you need to remove the legacy workload. This step is not needed for upgrades between Aspire 9 versions or later. - -Previously the **aspire workload** was required to create and run Aspire projects. But, with Aspire 9 and later the workload is no longer required and should be removed from your .NET environment. - - - - - -1. Find the installation source by opening a terminal and running the `dotnet workload list` command. - - The preceding command lists the workloads installed in the .NET environment. The method used to install Aspire is listed under the **Installation Source** column of the output, and is either _VS_ for Visual Studio or _SDK_ for the .NET SDK. For example, the following snippet indicates that Visual Studio was used to install Aspire: - - ``` - Installed Workload Id Manifest Version Installation Source - -------------------------------------------------------------------- - aspire 8.2.2/8.0.100 VS 17.14.36109.1 - ``` - -2. Remove Aspire 8 based on the installation source: - - - - 1. Open the **Visual Studio Installer** app - 2. **Modify** the installation instance of Visual Studio - 3. Select **Individual Components** - 4. Search for `aspire` - 5. Unselect **Aspire SDK** - 6. Select the **Modify** button to apply the changes - - - Run `dotnet workload uninstall aspire` to remove Aspire. - - - - - -## Verify the upgrade - -As with any upgrade, ensure that the app runs as expected and that all tests pass. Build the solution and look for suggestions, warnings, or errors in the output window—address anything that wasn't an issue before. - -If you encounter any issues, let us know by [filing a GitHub issue](https://github.com/dotnet/aspire/issues/new/choose). +## Need help? - +- 🆘 Stuck? [Join the Discord community](https://discord.com/invite/raNPcaaSj8) for real-time support +- 🐛 Found a bug? [File a GitHub issue](https://github.com/dotnet/aspire/issues/new/choose) +- 👀 Review [setup and tooling](/get-started/setup-and-tooling/) for configuration tips