Skip to content

Dynamically downgrade bundled framework versions - #8610

Merged
mthalman merged 2 commits into
dotnet:mainfrom
mthalman:mthalman-fix-installer-version-downgrade
Aug 26, 2026
Merged

mthalman merged 2 commits into
dotnet:mainfrom
mthalman:mthalman-fix-installer-version-downgrade

Conversation

@mthalman

Copy link
Copy Markdown
Member

Problem

Installer scenario tests only downgraded bundled .NET 8 and 9 framework versions. When .NET 10 servicing versions advanced beyond publicly available packages, restore requested unpublished targeting, runtime, and host packs and failed with NU1102.

Solution

Discover serviced framework versions dynamically from LatestRuntimeFrameworkVersion entries and downgrade each eligible patch. This removes hardcoded framework versions and automatically handles future releases.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 67299433-dbf0-4823-a515-210b1b6bbe54
@mthalman
mthalman requested a review from a team as a code owner August 24, 2026 19:39
Copilot AI lite review requested due to automatic review settings August 24, 2026 19:39
@mthalman
mthalman requested a review from a team as a code owner August 24, 2026 19:39
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Linux installer scenario-test setup to avoid hardcoded framework bands by dynamically discovering serviced framework versions from LatestRuntimeFrameworkVersion entries and downgrading each eligible version in the SDK’s Microsoft.NETCoreSdk.BundledVersions.props, preventing restores from requesting unpublished packs.

Changes:

  • Updated the installer tests’ comments/Dockerfile generation text to reflect the new “serviced framework versions” behavior.
  • Enhanced downgrade-fx-versions.sh to discover applicable .NET major/minor versions dynamically and apply the downgrade per discovered version.
  • Updated the script’s verification output to iterate over discovered versions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
test/Microsoft.DotNet.Installer.Tests/LinuxInstallerTests.cs Updates test comments/Dockerfile text to align with the new dynamic downgrade behavior.
test/Microsoft.DotNet.Installer.Tests/assets/downgrade-fx-versions.sh Dynamically discovers serviced versions via LatestRuntimeFrameworkVersion and downgrades each eligible version.
Suppressed comments (1)

test/Microsoft.DotNet.Installer.Tests/assets/downgrade-fx-versions.sh:117

  • The verification grep pattern also interpolates the version string without escaping '.', which makes '.' match any character and can produce misleading output. Escape the version before building the regex.
for version in "${dotnet_versions[@]}"; do
    echo "${version} versions in file:"
    grep -oP "${version}\.\d+" "$PROPS_FILE" | sort -u
    echo ""

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 67299433-dbf0-4823-a515-210b1b6bbe54
@mthalman
mthalman merged commit e78be02 into dotnet:main Aug 26, 2026
11 checks passed
@mthalman
mthalman deleted the mthalman-fix-installer-version-downgrade branch August 26, 2026 17:14
@mthalman

Copy link
Copy Markdown
Member Author

/backport to release/11.0.1xx

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0.1xx (link to workflow run)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants