Upgrading the Visual Studio Development Tools

Use Visual Studio Installer to upgrade. After upgrading to v17.12, the .NET 9.0 SDK and the Aspire 9.0 workload are installed automatically.

Non-Visual Studio Development Environments

Install .NET Core SDK 9.0

Install the latest .NET SDK 9.0 release

Check the .NET SDK version:

dotnet --version
dotnet --list-sdks

Upgrade the Aspire Workload

Run the following commands in the project directory:

dotnet workload uninstall aspire
dotnet workload install aspire
dotnet workload list
dotnet workload update

Upgrading the Project Files

Add the new node to the Host project:

<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0" />

Change the target framework of all project files to net9.0:

<TargetFramework>net9.0</TargetFramework>

Install the EF Core base package

dotnet add package Microsoft.EntityFrameworkCore

Upgrade all NuGet packages in the solution

dotnet package upgrade --to-latest

Simplification Tools Available

https://learn.microsoft.com/zh-cn/dotnet/core/porting/upgrade-assistant-install

Service Discovery Now Supports the https+http Scheme

httpClient.BaseAddress = new Uri("https+http://identityservice")