Reconsider global.json sdk.paths precedence for dotnetup init root
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Description
During `dotnetup init`, `InstallPathResolver` currently gives the first `sdk.paths` entry from the nearest `global.json` precedence over the default dotnetup install root when `--install-path` is not specified. This means running init from inside a repository can select a repository-specific SDK lookup path as the managed dotnetup hive.
This behavior became visible while adding the setup summary in #55648. That PR now identifies when the displayed install root was inferred from `global.json`, but changing the precedence is intentionally out of scope there.
### Current precedence
1. Explicit `--install-path`
2. First `sdk.paths` entry from `global.json`
3. Default dotnetup install root
### Follow-up
Decide whether first-run/init should ignore `global.json` `sdk.paths` when choosing the default managed hive, while preserving the intended behavior for explicit SDK install operations.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.