بنقرة واحدة
aspire-upgrade
// Update the Aspire version in the repository to the latest nightly build.
// Update the Aspire version in the repository to the latest nightly build.
Use this skill when the user is working with an Aspire distributed application and needs to operate the AppHost or its resources through the Aspire CLI: start, restart, stop, or wait on the app; inspect resources, logs, traces, docs, or health; add integrations; manage secrets or config; publish, deploy, or rerun a named pipeline step; initialize Aspire in an existing app; recover missing `.aspire/modules` files in a TypeScript AppHost; discover the right frontend URL for Playwright from Aspire state; expose custom dashboard/resource commands; or understand unfamiliar Aspire AppHost APIs in C# or TypeScript. Use it even if they describe the task in terms of an AppHost, resources, dashboard, existing app bootstrap, missing generated modules, Playwright URL discovery, C# API understanding, or local distributed app workflow without explicitly naming Aspire. Do not use it for non-Aspire .NET apps, container-only repos with no AppHost, or ordinary build and test tasks.
One-time skill for completing Aspire initialization in an existing app after `aspire init` has dropped the skeleton AppHost. Use this skill when an `aspire.config.json` exists but the AppHost has not yet been wired up.
| name | aspire-upgrade |
| description | Update the Aspire version in the repository to the latest nightly build. |
The target version prefix is 13.4.
You are responsible for updating the Aspire version in our repo to the latest nightly build.
You are to use the NuGet feed https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json
Look for the latest nightly version that starts with the target version prefix above. To do this, you will need to use the .NET CLI package search feature with the --prerelease and --exact-match flags (and probably best to specify the feed with --source to avoid confusion with any stable versions from nuget.org). Query for the Aspire.AppHost.Sdk package as it is a dependency of all our AppHost projects and will be the most reliable way to find the correct version string.
Here is an example command to find the latest version:
dotnet package search Aspire.AppHost.Sdk --prerelease --exact-match --source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json --format json
Parse the result for the latest version that matches the target version prefix. This will be the version you update to in the next steps.
Directory.Build.propsUpdate the following values in the root Directory.Build.props file:
<AspireMajorVersion>MAJOR_VERSION</AspireMajorVersion>
<AspireVersion>$(AspireMajorVersion).MINOR_VERSION.PATCH_VERSION-PREVIEW_VERSION</AspireVersion>
<AspirePreviewSuffix></AspirePreviewSuffix>
Where MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, and PREVIEW_VERSION are the respective parts of the version you found.
When using a nightly build, we want to blank out the AspirePreviewSuffix to avoid confusion with the actual preview versions.
Search the entire repository for all .csproj files whose <Project Sdk="..."> attribute references Aspire.AppHost.Sdk. There are many of these across tests/, tests-app-hosts/, and examples/.
Each one must be updated to the full version string:
<Project Sdk="Aspire.AppHost.Sdk/MAJOR_VERSION.MINOR_VERSION.PATCH_VERSION-PREVIEW_VERSION">
We cannot use a MSBuild variable in the Project SDK attribute, so you must hardcode the version in every file.
Use a command like grep -rl "Aspire.AppHost.Sdk" --include="*.csproj" to find all files that need updating.
aspire.config.json filesSearch the entire repository for all aspire.config.json files (typically under examples/ in directories ending with .AppHost.TypeScript). Each file has an sdk.version field that must be updated to the new version.
The sdk.version value should be the full version string (e.g., 13.4.0-preview.1.25280.1).
Use a command like find . -name "aspire.config.json" to locate all files, then update the "version" value inside the "sdk" object in each one.
Run dotnet restore at the repository root to verify the new version resolves correctly. Fix any errors before proceeding.
After all changes are made and validated, create a pull request with the title "Update Aspire version to X.Y.Z" where X.Y.Z is the full version you updated to.