Upgrade Aspire to the latest version
Upgrade Aspire by updating the Aspire CLI and the Aspire packages used by your app. The aspire update command handles most package updates for supported AppHost configurations, but you should also review breaking changes and update tooling extensions.
Upgrade with the Aspire CLI
Section titled “Upgrade with the Aspire CLI”-
Update the Aspire CLI to the latest version:
Update the Aspire CLI aspire update --selfIf you installed the CLI from npm or as a .NET tool,
aspire update --selfprints the matching package-manager command to run (for example,npm install -g @microsoft/aspire-cli@latest) instead of replacing a package-manager-owned binary. See Updating the CLI based on how it was installed. -
Update your Aspire app by running:
Update your Aspire app aspire updateThis command automatically:
- Detects outdated Aspire integrations, templates, and SDK version
- Updates the SDK version and Aspire integration versions for the configured Aspire channel
- Handles versions declared inline, in
aspire.config.json, or in supported centralized version files
For more information, see aspire update command reference.
Migrate .NET project resources (Aspire 17)
Section titled “Migrate .NET project resources (Aspire 17)”Starting in Aspire 17, AddProject and AddCSharpApp are obsolete. aspire update updates your packages but doesn’t rewrite these calls. Replace them with AddDotnetProject from the Aspire.Hosting.Dotnet integration to use the new DotnetProjectResource.
C# AppHosts that use Aspire.AppHost.Sdk also report warning ASPIRE012. aspire update doesn’t remove the SDK; replace it with Microsoft.NET.Sdk and explicit Aspire.Hosting.AppHost and Aspire.Hosting.Dotnet package references.
For steps, caveats, and an optional agent skill, see Migrate to the new DotnetProjectResource.
Try a prerelease build
Section titled “Try a prerelease build”To test your app against an upcoming release before it ships, switch both the CLI and your app to the staging channel. Staging builds come from the current release branch and aren’t intended for production use. Use a branch or a throwaway copy of your repository.
-
Update the Aspire CLI to a staging build:
Update the CLI to staging aspire update --self --channel stagingThis switches CLIs installed with the install script. If you installed the CLI as a .NET tool or with npm,
aspire update --selfprints the package manager’s update command instead and doesn’t switch channels. Reinstall with the install script and the--quality stagingoption (-Quality 'staging'in PowerShell) instead. Use the same option in CI instead of the defaultreleasequality. -
Update your app to the staging channel:
Update the app to staging aspire update --channel staging --migrateBesides updating package versions, this command writes
"channel": "staging"toaspire.config.jsonwhen that file exists. For TypeScript and other non-C# AppHosts, lateraspire addandaspire updateruns use that saved channel. For C# AppHosts, anaspire updaterun without--channelfollows your NuGet configuration instead of the saved channel, so pass--channel stagingon each update while you test.For C# AppHosts, the command can also create or update a project-level
NuGet.configthat adds the staging feed. Depending on your existing configuration, it can also:- Add a package source mapping that routes
Aspire*packages to the staging feed. - Set
globalPackagesFolderto a repository-local.nugetpackagesfolder when one isn’t already set, so prerelease packages don’t mix with your global package cache. If it does, add.nugetpackages/to your.gitignore.
Review the resulting
NuGet.configbefore you commit it.--migrateapplies only automatic migrations. Build the app afterward and review any new warnings, such asASPIRE012, which flags approval-gated changes thataspire updatedoesn’t make for you. For theASPIRE012migration steps, see aka.ms/aspire/diagnostics/aspire012. For other warnings, see the diagnostics overview. - Add a package source mapping that routes
-
Point
aspire docsat the prerelease documentation. The prerelease site, reached throughhttps://aka.ms/aspire/vnext, documents features that aren’t on aspire.dev yet. Open that link once to find the prerelease host, then set both documentation sources so guide search and API lookup (including AI agent skills that callaspire docs) read the same content:aspire.config.json {"docs": {"llmsTxtUrl": "https://<prerelease-host>/llms-full.txt","api": {"sitemapUrl": "https://<prerelease-host>/sitemap-0.xml"}}}For details, see
docs.llmsTxtUrlanddocs.api.sitemapUrl. The prerelease sitemap still lists canonicalaspire.devpage URLs. -
Verify the switch. Run
aspire --versionto confirm the CLI build, check that your Aspire package references resolve to the staging version, and runaspire docs searchfor a feature that’s new in the release. -
Check for anything the updater skipped.
aspire updateupdates the AppHost it selects and the package versions it uses. Check these by hand:- Central package pins that no project currently references.
- Other AppHosts in the repository.
- CLI versions or install qualities pinned in CI workflows and dev container definitions.
-
Switch back to stable when you’re done by running
aspire update --channel stablefor the app, thenaspire update --self --channel stablefor the CLI. Remove thedocsoverrides fromaspire.config.json. If your app was already up to date,aspire updatecan leave the stagingNuGet.configentries in place; remove them manually.
Update standalone dashboard container references
Section titled “Update standalone dashboard container references”If you manage the standalone dashboard as a container, its stable image repository is now mcr.microsoft.com/aspire/dashboard; nightly images use mcr.microsoft.com/aspire/nightly/dashboard. Updating the Aspire CLI or packages doesn’t rewrite image references in your own Docker commands, Compose files, or Kubernetes manifests.
Before replacing a legacy dotnet/aspire-dashboard or dotnet/nightly/aspire-dashboard reference, verify that the tag you use exists in the new repository. Legacy repositories continue to receive Aspire 13 servicing images, but their latest tag stays on the Aspire 13 line rather than following future major releases. Generated deployment output remains specific to the Aspire publisher version.
For the repository mapping, tag selection, and compatibility details, see Container image repositories and migration.
Update the VS Code extension (optional)
Section titled “Update the VS Code extension (optional)”If you have the Aspire extension installed, you can update it to get the latest tooling support:
- Open VS Code
- Go to Extensions (
Command + Shift + XCommandShiftXControl + Shift + XCtrlShiftXControl + Shift + XCtrlShiftX ) - Search for Aspire
- Click Update if an update is available
For more information, see Aspire extension for VS Code.
Remove the legacy workload (Aspire 8 only)
Section titled “Remove the legacy workload (Aspire 8 only)”If you’re upgrading from Aspire 8 and your machine has the legacy Aspire workload installed, remove it after updating the CLI. For Aspire 9 or later, no action is required.
Remove the aspire workload with the following command:
dotnet workload uninstall aspireVerify the upgrade
Section titled “Verify the upgrade”After upgrading, run your application to ensure everything works as expected:
aspire runNeed help?
Section titled “Need help?”- 🆘 Stuck? Join the Discord community for real-time support
- 🐛 Found a bug? File a GitHub issue