[.NET10 RC2] Unset other DOTNET_ROOT env vars when launching apphosts #2585
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.
Should fix problems when
DOTNET_ROOT_<arch>orDOTNET_ROOT(x86)var is set from the outside and the apphost would use those instead of theDOTNET_ROOTvar we set.For example, in NuGet.Client CI: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1156878&view=logs&j=f105d2c8-32d0-5cff-b114-87cf330929dd&t=f92a2093-7359-5d67-e113-8e3692a1dec4&l=94441
Follow up on dotnet/roslyn#80026.
Validated manually (built roslyn+sdk locally, used that sdk with a repro case).