Allow the muxer to skip global.json resolution entirely
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- build-system, cli
Research direction
Start by locating the .NET muxer entry point and its global.json probing logic, then inspect existing environment-variable controls and related documentation. Define how a documented opt-out should make probing rely on the process environment, and verify the behavior with the muxer's resolution or integration tests; the payload does not name specific files or tests.
Written by the indexing model from the issue text.
Description
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".
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/runtime
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
area-System.Reflection blocking-clean-ci-optional Known Build Error os-mac-os-x untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agentic-workflows untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
area-VM-meta-mono untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
Create parent directories only after the containment check in InstallHelper.TryExtractToDirectory Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PowerShell/PSResourceGet#2056 ·