Skip to content

Allow the muxer to skip global.json resolution entirely #118488

Open

Description

@baronfel

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

  1. added
    untriaged
    on Aug 7, 2025
  2. added
    needs-area-label
    on Aug 7, 2025
  3. added and removed
    needs-area-label
    on Aug 7, 2025
  4. added this to the 11.0.0 milestone on Aug 11, 2025
  5. removed
    untriaged
    on Aug 11, 2025
  6. modified the milestones: 11.0.0, 12.0.0 on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions