Aspire

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.

  1. Update the Aspire CLI to the latest version:

    Update the Aspire CLI
    aspire update --self

    If you installed the CLI from npm or as a .NET tool, aspire update --self prints 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.

  2. Update your Aspire app by running:

    Update your Aspire app
    aspire update

    This 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.

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.

  1. Update the Aspire CLI to a staging build:

    Update the CLI to staging
    aspire update --self --channel staging

    This switches CLIs installed with the install script. If you installed the CLI as a .NET tool or with npm, aspire update --self prints the package manager’s update command instead and doesn’t switch channels. Reinstall with the install script and the --quality staging option (-Quality 'staging' in PowerShell) instead. Use the same option in CI instead of the default release quality.

  2. Update your app to the staging channel:

    Update the app to staging
    aspire update --channel staging --migrate

    Besides updating package versions, this command writes "channel": "staging" to aspire.config.json when that file exists. For TypeScript and other non-C# AppHosts, later aspire add and aspire update runs use that saved channel. For C# AppHosts, an aspire update run without --channel follows your NuGet configuration instead of the saved channel, so pass --channel staging on each update while you test.

    For C# AppHosts, the command can also create or update a project-level NuGet.config that 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 globalPackagesFolder to a repository-local .nugetpackages folder 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.config before you commit it.

    --migrate applies only automatic migrations. Build the app afterward and review any new warnings, such as ASPIRE012, which flags approval-gated changes that aspire update doesn’t make for you. For the ASPIRE012 migration steps, see aka.ms/aspire/diagnostics/aspire012. For other warnings, see the diagnostics overview.

  3. Point aspire docs at the prerelease documentation. The prerelease site, reached through https://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 call aspire 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.llmsTxtUrl and docs.api.sitemapUrl. The prerelease sitemap still lists canonical aspire.dev page URLs.

  4. Verify the switch. Run aspire --version to confirm the CLI build, check that your Aspire package references resolve to the staging version, and run aspire docs search for a feature that’s new in the release.

  5. Check for anything the updater skipped. aspire update updates 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.
  6. Switch back to stable when you’re done by running aspire update --channel stable for the app, then aspire update --self --channel stable for the CLI. Remove the docs overrides from aspire.config.json. If your app was already up to date, aspire update can leave the staging NuGet.config entries 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.

If you have the Aspire extension installed, you can update it to get the latest tooling support:

  1. Open VS Code
  2. Go to Extensions (Command + Shift + XControl + Shift + XControl + Shift + X)
  3. Search for Aspire
  4. 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:

Remove the legacy Aspire workload
dotnet workload uninstall aspire

After upgrading, run your application to ensure everything works as expected:

Run the Aspire application
aspire run