Repository navigation
Remove '.dotnet' from SDK paths in global.json - #12880
Conversation
Removed the '.dotnet' path from SDK paths. with this the core bootstrap does not work as intended and it confuses copilot agents when you run the bootstrap now with `artifacts/bin/bootstrap/core/dotnet build` it takes Microsoft.Build.dll from the sdk folder instead of the bootstrap folder and we're solving that by locally deleting this line. so let's delete it by default
There was a problem hiding this comment.
Pull request overview
This PR fixes a bootstrap SDK resolution issue by removing .dotnet from the SDK paths in global.json. When developers use the bootstrap MSBuild via artifacts/bin/bootstrap/core/dotnet build, the presence of .dotnet in SDK paths causes the .NET SDK to preferentially load Microsoft.Build.dll from the standard SDK location (.dotnet) instead of from the bootstrap folder where the freshly built MSBuild binaries reside. This defeats the purpose of the bootstrap environment, which is designed to test the locally built MSBuild bits.
Key Changes
- Removed
.dotnetfrom thesdk.pathsarray inglobal.json, leaving only$host$as the SDK resolution path - This ensures the bootstrap environment correctly uses the freshly built MSBuild from
artifacts/bin/bootstrap/corerather than the SDK used to build MSBuild
rainersigwald
left a comment
There was a problem hiding this comment.
I'm ok with this though I'd prefer to be able to tell the new private SDK not to pay attention to this with dotnet/runtime#118488 (which isn't yet implemented).
Context
with this the core bootstrap does not work as intended and it confuses copilot agents

when you run the bootstrap in main with
artifacts/bin/bootstrap/core/dotnet buildit takes Microsoft.Build.dll from the sdk folder instead of the bootstrap folder and we're solving that by locally deleting this line. So let's delete in the repoTesting
local validation it fixes the loading issue
Notes