Skip to content

Conversation

@rainersigwald
Copy link
Member

Uses SDK hint paths to tell modern SDK resolvers (.NET CLI in 10 previews, and unreleased VS versions at present) to use the SDK from the .dotnet folder that Arcade restores, instead of the default behavior.

Should be silently ignored by older resolvers, so shouldn't change CI behavior.

Uses [SDK hint paths][] to tell modern SDK resolvers (.NET CLI in 10
previews, and unreleased VS versions at present) to use the SDK from
the `.dotnet` folder that Arcade restores, instead of the default
behavior.

[hint_paths]: https://github.com/dotnet/designs/blob/238ca0202ea5df96d378a06c01960fc289aba166/accepted/2025/local-sdk-global-json.md
@rainersigwald rainersigwald marked this pull request as ready for review June 6, 2025 20:15
Copilot AI review requested due to automatic review settings June 6, 2025 20:15
@rainersigwald rainersigwald requested a review from a team as a code owner June 6, 2025 20:15
@rainersigwald rainersigwald enabled auto-merge (squash) June 6, 2025 20:15
Copy link
Contributor

Copilot AI left a comment

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 configures the .NET SDK resolver to prefer the locally restored .dotnet folder and provides a custom error message if no SDK is found.

  • Add SDK hint paths to direct modern CLI/VS resolvers to .dotnet and fallback to host-installed SDKs
  • Introduce an errorMessage to guide contributors when the SDK lookup fails
Comments suppressed due to low confidence (2)

global.json:4

  • New SDK hint paths logic isn’t exercised by existing tests; consider adding a CI or unit test to verify resolution order from .dotnet and fallback to $host$.
"paths": [ ".dotnet", "$host$" ],

global.json:5

  • [nitpick] Update the project README or contributor guide to explain the new paths and errorMessage properties so users understand the custom resolution behavior and fallback instructions.
"errorMessage": "The .NET SDK could not be found, please run a command-line build with ./build.cmd."

@rainersigwald rainersigwald merged commit 5d3a363 into dotnet:main Jun 9, 2025
10 checks passed
@rainersigwald rainersigwald deleted the global-json-local-sdk-path branch June 9, 2025 07:17
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