question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should dotnet --info surface a global.json in the mix?

See original GitHub issue

Steps to reproduce

  1. Create a project with a global.json in a parent folder that sets the SDK.
  2. Dr. Frankenstein on your creation 👹 for months (and forget the global.json is up in the parent folders somewhere).
  3. Prep to upgrade the project: Install a newer SDK.
  4. 😢 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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nguerreracommented, Aug 14, 2017

Good idea!

0reactions
livarcocccommented, Nov 15, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found