Description
aspire add records and reports the integration catalog/requested version instead of the NuGet-resolved package version for prerelease integration packages that have not shipped yet.
This showed up while adding a prerelease integration on the 13.4 staging SDK/channel. The integration catalog requested 13.3.5-preview.1.26270.6, but restore resolved the available 13.4 prerelease package 13.4.0-preview.1.26280.4. The command still persisted and printed the stale requested version.
Repro
Starting from a TypeScript AppHost with this scrubbed aspire.config.json shape:
{
"appHost": {
"path": "apphost/apphost.mts",
"language": "typescript/nodejs"
},
"sdk": {
"version": "13.4.0"
},
"channel": "staging",
"packages": {
"Aspire.Hosting.JavaScript": "13.4.0"
}
}
Clear the project-local integration restore cache, then add a prerelease integration package that has not shipped yet:
rm -rf .aspire
aspire add <prerelease-integration> --debug --non-interactive
Observed with:
aspire add foundry --debug --non-interactive
CLI version:
13.4.0+56e88661e4d6026cea423827c62c067e11fdf192
Actual behavior
The command prints success for the stale catalog/requested prerelease version:
✅ The package Aspire.Hosting.Foundry::13.3.5-preview.1.26270.6 was added successfully.
aspire.config.json is updated with that same requested version:
"packages": {
"Aspire.Hosting.JavaScript": "13.4.0",
"Aspire.Hosting.Foundry": "13.3.5-preview.1.26270.6"
}
However, the debug/restore output shows NuGet resolved the available 13.4 prerelease instead:
WARNING: AspireRestore depends on Aspire.Hosting.Foundry (>= 13.3.5-preview.1.26270.6) but Aspire.Hosting.Foundry 13.3.5-preview.1.26270.6 was not found. Aspire.Hosting.Foundry 13.4.0-preview.1.26280.4 was resolved instead.
The generated integration probe manifest also points at the NuGet-resolved 13.4 prerelease package:
<home>/.aspire/.nugetpackages/<hash>/aspire.hosting.foundry/13.4.0-preview.1.26280.4/lib/net8.0/Aspire.Hosting.Foundry.dll
The debug log confirms the SDK/channel context:
Resolved 'staging' channel: feed=<staging Aspire feed>, quality=Stable, pinnedVersion=(none)
Using SDK version from configuration: 13.4.0
Expected behavior
For prerelease integration packages that have not shipped yet, aspire add should persist and report the NuGet-resolved package version, 13.4.0-preview.1.26280.4 in this run, rather than the stale catalog/requested version 13.3.5-preview.1.26270.6.
Description
aspire addrecords and reports the integration catalog/requested version instead of the NuGet-resolved package version for prerelease integration packages that have not shipped yet.This showed up while adding a prerelease integration on the 13.4 staging SDK/channel. The integration catalog requested
13.3.5-preview.1.26270.6, but restore resolved the available 13.4 prerelease package13.4.0-preview.1.26280.4. The command still persisted and printed the stale requested version.Repro
Starting from a TypeScript AppHost with this scrubbed
aspire.config.jsonshape:{ "appHost": { "path": "apphost/apphost.mts", "language": "typescript/nodejs" }, "sdk": { "version": "13.4.0" }, "channel": "staging", "packages": { "Aspire.Hosting.JavaScript": "13.4.0" } }Clear the project-local integration restore cache, then add a prerelease integration package that has not shipped yet:
Observed with:
CLI version:
Actual behavior
The command prints success for the stale catalog/requested prerelease version:
aspire.config.jsonis updated with that same requested version:However, the debug/restore output shows NuGet resolved the available 13.4 prerelease instead:
The generated integration probe manifest also points at the NuGet-resolved 13.4 prerelease package:
The debug log confirms the SDK/channel context:
Expected behavior
For prerelease integration packages that have not shipped yet,
aspire addshould persist and report the NuGet-resolved package version,13.4.0-preview.1.26280.4in this run, rather than the stale catalog/requested version13.3.5-preview.1.26270.6.