Skip to content

SuppressFinalPackageVersion causes E2E test failures on release branches #15511

@mitchdenny

Description

@mitchdenny

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.Docker
  • Aspire.Hosting.Kubernetes
  • Aspire.Hosting.Foundry
  • Aspire.Hosting.Maui
  • Aspire.Hosting.Keycloak
  • Aspire.Hosting.Azure.Kusto
  • And several component packages

Possible Fix Approaches

  1. 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
  2. Override version suffix in CI — ensure SuppressFinalPackageVersion packages get a version suffix compatible with prerelease ordering (e.g., preview.1.99999.99)
  3. Remove SuppressFinalPackageVersion from Docker/Kubernetes on release branches if they're ready to ship stable

Observed In

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions