Should dotnet --info surface a global.json in the mix?
See original GitHub issueSteps to reproduce
- Create a project with a global.json in a parent folder that sets the SDK.
- Dr. Frankenstein on your creation 👹 for months (and forget the global.json is up in the parent folders somewhere).
- Prep to upgrade the project: Install a newer SDK.
- 😢 Can’t figure out why tools aren’t upgraded for the project.
Expected behavior
dotnet --info
tells you that an intervening global.json (with its path) is holding back the SDK.
Actual behavior
😵 Can’t figure out why the SDK is stuck on an older version.
Source
Slack chat: This just happened to a dev today, and it happened to me once several months ago.
I understand if u lean “DNF” on this suggestion; however, consider that if it would be easy to surface that the SDK is fixed by a global.json in the output of dotnet --info
, WHY NOT??? I speculate it would save many devs from some pain.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:8 (8 by maintainers)
Top Results From Across the Web
global.json overview - .NET CLI
The .NET SDK looks for a global.json file in the current working directory (which isn't necessarily the same as the project directory) or...
Read more >Should I use global.json? - Alessio Franceschelli
I often get asked if it is better to have a global.json in a .NET project (not necessarily .NET Core) to define a...
Read more >Unhelpful error message when global.json points to .NET ...
When a solution has a global.json file in it that pins to an SDK version that does not exist on the target machine,...
Read more >R.I.P project.json - Out with the new, in with the old
Nuget packages get mixed and I don't like that. There is not filter to only retrieve dotnet core packages which is very important...
Read more >global.json not work or not recognized by my .NET project
The global.json setting "sdk" selects the SDK, not the target platform. That means it chooses (basically) the compiler to use, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good idea!
We are looking into a mine re-haul of dotnet --info on https://github.com/dotnet/cli/issues/7926.
I am closing this issue in favor of that one that has traction.
cc @KathleenDollard to add the idea of indicating that the SDK version is coming from a global.json.