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.
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 + X CommandShiftX Control + Shift + X CtrlShiftX Control + Shift + X CtrlShiftX ) - 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