-
Notifications
You must be signed in to change notification settings - Fork 847
Description
Summary
The DockerDeploymentTests and KubernetesPublishTests CLI E2E tests fail on release/13.2 (and likely any future release branch) due to a versioning mismatch caused by the interaction between SuppressFinalPackageVersion=true and StabilizePackageVersion=true.
Root Cause
On release branches, StabilizePackageVersion=true sets DotNetFinalVersionKind=release, which creates a version split between two groups of packages:
| Group | Package Version | Assembly Version |
|---|---|---|
Stable (no SuppressFinalPackageVersion) |
13.2.0 |
13.2.0.0 (official) or 42.42.42.42 (CI) |
Suppressed (SuppressFinalPackageVersion=true) |
13.2.0-ci |
42.42.42.42 |
The Arcade SDK (Version.BeforeCommonTargets.targets line 138) re-applies a prerelease suffix (ci) for SuppressFinalPackageVersion=true packages even when other packages get stable versions.
Docker Test: CS1705 Assembly Version Mismatch
CS1705: Assembly 'Aspire.Hosting.Docker, Version=42.42.42.42' uses
'Aspire.Hosting, Version=42.42.42.42' which has a higher version than
referenced assembly 'Aspire.Hosting, Version=13.2.0.0'
The hive's Aspire.Hosting.Docker (CI-built, 42.42.42.42) references Aspire.Hosting at 42.42.42.42, but the E2E test project resolves Aspire.Hosting 13.2.0 from nuget.org (officially-built, assembly version 13.2.0.0) because the temporary NuGet.config with hive source mapping is only used during package discovery, not during dotnet add package restore.
Kubernetes Test: NU1102 Version Not Found
NU1102: Unable to find package Aspire.Hosting.Kubernetes with version (>= 13.2.0-preview.1.26170.3)
- Found 1 version(s) in hive [ Nearest version: 13.2.0-ci ]
A transitive dependency constraint requires >= 13.2.0-preview.1.26170.3, but the hive only has 13.2.0-ci. In NuGet SemVer ordering, ci < preview alphabetically, so the constraint cannot be satisfied.
Why This Only Affects Release Branches
On main, StabilizePackageVersion=false → all packages get the same prerelease suffix → no version split → no mismatch.
Affected Packages
All packages with SuppressFinalPackageVersion=true:
Aspire.Hosting.DockerAspire.Hosting.KubernetesAspire.Hosting.FoundryAspire.Hosting.MauiAspire.Hosting.KeycloakAspire.Hosting.Azure.Kusto- And several component packages
Possible Fix Approaches
- Ensure hive packages take priority during
dotnet add package— propagate the hive NuGet.config to the project directory so restore uses hive packages instead of nuget.org - Override version suffix in CI — ensure
SuppressFinalPackageVersionpackages get a version suffix compatible with prerelease ordering (e.g.,preview.1.99999.99) - Remove
SuppressFinalPackageVersionfrom Docker/Kubernetes on release branches if they're ready to ship stable
Observed In
- PR [release/13.2] Pin Kusto emulator image and backport Cosmos fix #15504 (
release/13.2branch) - CI run: https://github.com/microsoft/aspire/actions/runs/23462466698
- Jobs:
Cli.EndToEnd-DockerDeploymentTests(68267913025),Cli.EndToEnd-KubernetesPublishTests(68267912889)