Skip to content

Remove '.dotnet' from SDK paths in global.json - #12880

Merged
JanProvaznik merged 1 commit into
mainfrom
JanProvaznik-patch-1
Dec 8, 2025
Merged

JanProvaznik merged 1 commit into
mainfrom
JanProvaznik-patch-1

Conversation

@JanProvaznik

@JanProvaznik JanProvaznik commented Dec 5, 2025 •

Copy link
Copy Markdown
Member

Context

with this the core bootstrap does not work as intended and it confuses copilot agents
image

when you run the bootstrap in main 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 in the repo

Testing

local validation it fixes the loading issue

Notes

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
Copilot AI review requested due to automatic review settings December 5, 2025 11:52
@JanProvaznik
JanProvaznik requested a review from a team as a code owner December 5, 2025 11:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .dotnet from the sdk.paths array in global.json, leaving only $host$ as the SDK resolution path
  • This ensures the bootstrap environment correctly uses the freshly built MSBuild from artifacts/bin/bootstrap/core rather than the SDK used to build MSBuild

Comment thread global.json Resolved
Comment thread global.json Resolved

@rainersigwald rainersigwald left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread global.json Resolved
Comment thread global.json Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants