You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow the muxer to skip global.json resolution entirely #118488
As the SDK and MSBuild teams have started adopting the sdk.paths feature in global.json, one thing we've noticed is that there are scenarios in which can make testing harder. These repos often do integration-level testing of an SDK-like layout in situ - and this often involves running dotnet- or msbuild.exe-based commands that intended to work on cutomized SDK layouts/roots.
It is relatively easy for us to configure these scenarios/environments to use these custom SDK roots by setting the following env vars:
PATH - to ensure the muxer in the layout root is used,
DOTNET_ROOT - to ensure the layout root is used when probing for Runtimes, and
DOTNET_HOST_PATH - to ensure that the muxer in the layout root isn't confused for the 'outer' dotnet.exe that started the testing host process, etc.
However, these tests are still vulnerable to SDK-resolution hijacking by global.jsons in the repo roots - especially with sdk.paths where the repo-local root may not have all of the runtimes the tests may require. To work around this, we've resorted to creating a 'dummy' global.json in the testing root file system heirarchy to act as a forced-stop for the global.json probing logic in the muxer.
Instead of generating this file, we feel it would be more understandable if the muxer itself had a documented knob that said "don't try to probe for global.json at all, just use the process environment to do probing".
Activity