-
Notifications
You must be signed in to change notification settings - Fork 341
Set dotnet_root_<arch> always #15266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
note for me: tested on wsl with rc1 release , patched with the newly built testruntime provider. |
src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs
Show resolved
Hide resolved
src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff is kinda hard to follow with, but reading the overall logic, LGTM.
Description
Always set DOTNET_ROOT_ (e.g. DOTNET_ROOT_X64) when running under dotnet test, to make sure that the location of dotnet".exe", propagates to the testhost and child processes when we are on windows, linux and macos. This allows local installations of dotnet to be used to run tests that run child executables. On Windows this is alread in place for a long time when testhost.exe is found, so it can resolve correctly dotnet that is not in program files.
On Linux and MacOS it will be used to run xunit v3 tests.
There is a feature flag to disable this new behavior:
VSTEST_DISABLE_DOTNET_ROOT_ON_NONWINDOWS=1
Related issue
Will fix dotnet/sdk#50331 once merged and flown.
Working:
Reverting to broken behavior with the feature flag: