[release/10.0.1xx] Add empty PATH component#3078
Merged
Merged
Conversation
NikolaMilosavljevic
approved these changes
Oct 23, 2025
Member
|
(approved over email) |
Member
|
we probably need to port this to main right? |
Member
|
/backport to main |
Contributor
|
Started backporting to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Customer Impact
Upgrading .NET 10 rom Preview 7, RC1 or RC2 to 10.0 RTM will result in not having
dotnet.exeon 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
RemoveExisitingProductsare scheduled.Testing
dotnetdotnetdotnetunder Program Files remains first on the path