Skip to content

[release/10.0.1xx] Add empty PATH component#3078

Merged
mmitche merged 1 commit into
dotnet:release/10.0.1xxfrom
joeloff:Net10Path
Oct 23, 2025
Merged

[release/10.0.1xx] Add empty PATH component#3078
mmitche merged 1 commit into
dotnet:release/10.0.1xxfrom
joeloff:Net10Path

Conversation

@joeloff

@joeloff joeloff commented Oct 23, 2025

Copy link
Copy Markdown
Member

Customer Impact

Upgrading .NET 10 rom Preview 7, RC1 or RC2 to 10.0 RTM will result in not having dotnet.exe on the system path.

Description

In Preview7, a change was made to conditionally set the system PATH. Prior to Preview7, the host installer scheduled the removal of the previous MSI at the end after installing the new product. Removing the environment setting from the original component requires modifying the scheduling to run early (removing the older product first before installing the new version).

This had an unintended impact on SxS installs. Installing .NET 9.0 and 10.0 and removing 10.0 would result in the removal of the new component because it only existed in the 10 host installer. Users would either need to repair previous .NET installations or manually edit the system PATH.

After RC2, the change was reverted. However, adding the environment entry back to the original component was itself a compositional change that required retaining the early removal of older installs. The later removal was a change introduced in ..NET 6.0 to avoid upgrades from swapping the x86 and x64 PATH, so reverting the P7 PR, but keeping the early removal would break this scenario.

This meant that upgrading from P7/RC1/RC2 to RTM would still result in removing the entry from the PATH and require users to repair .NET immediately after updating. By keeping an empty component that match the new component introduced in P7, the reference counts are maintained and the PATH remains set when upgrading.

Risk

Low/Medium. We're tweaking the components to satisfy the specific upgrade requirements without regressing other requirements that prohibit us from modifying when RemoveExisitingProducts are scheduled.

Testing

  • RC2 + Private build with the fix: Path contains dotnet
  • RC2 + Latest GA build from staging: Path is missing dotnet
  • VS 17.12 LTSC (9.0 SDK and runtime) + Private - Private: Path is correct
  • 5.0.17 (x64) + 5.0.17 (x86) + 10.0.0-rc.2 (x64) + GA (without fix): Only x86 path is set.
  • 5.0.17 (x64) + 5.0.17 (x86) + 10.0.0-rc2 (x64) + Private: dotnet under Program Files remains first on the path

@ericstj ericstj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@mmitche mmitche enabled auto-merge (squash) October 23, 2025 21:01
@ericstj ericstj added Servicing-consider Issue for next servicing release review Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 23, 2025
@ericstj

ericstj commented Oct 23, 2025

Copy link
Copy Markdown
Member

(approved over email)

@mmitche mmitche merged commit df6b2d5 into dotnet:release/10.0.1xx Oct 23, 2025
10 checks passed
@akoeplinger

Copy link
Copy Markdown
Member

we probably need to port this to main right?

@akoeplinger

Copy link
Copy Markdown
Member

/backport to main

@github-actions

github-actions Bot commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Started backporting to main (link to workflow run)

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

Labels

Servicing-approved Approved for servicing release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants