Incorrect SDK version used when multiple SDKs are installed
See original GitHub issueThe version detection logic in tools.sh/ps1
will use a globally installed “dotnet” if the install directory contains the SDK version requested in global.json.
If there are multiple SDKs installed (one that happens to match the requested version), this can result in using a version later than the one requested. Together with https://github.com/dotnet/arcade/issues/3763 this was resulting in local builds of coreclr using an incorrect SDK version in some cases.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:13 (13 by maintainers)
Top Results From Across the Web
NETSDK1141: Unable to resolve the .NET SDK version as ...
Cause · The SDK version in the global.json file is incorrectly specified. · The SDK version specified in the global.json file was not...
Read more >c# - .NET SDK's Not Installing Correctly
NET Core SDK installer works, it does not install the SDK correctly for some reason, so you have to do it manually. Go...
Read more >How to Install multiple versions of .Net SDK on Ubuntu
Net SDK version to the latest available which is 2.2.300 . Is it possible to to install multiple versions of the same SDK?...
Read more >Why don't any of these methods work for installing .Net ...
sudo apt update sudo apt install dotnet-sdk-6.0. And I got the last version of the SDK: $ dotnet --list-sdks 6.0.400 [/usr/share/dotnet/sdk].
Read more >How to install multiple .net core versions on Linux? : r/dotnet
Hi, I want to learn F#, but it looks like I need .net6 and 7 installed. For Exercism I need .net7, but I...
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
It sounds like Arcade is inconsistently blocking roll-forward: (I guess because of the “is .NET Core installed?” capability test)
@chcosta I only saw this in local builds (and I’m guessing the official/ci builds won’t run into this because they probably don’t have any newer SDKs installed globally).
For example, coreclr currently uses
3.0.100-preview7-012821
, and I have a global install of version5.0.100-alpha1-013789
. When I run, for example./eng/common/msbuild.sh src/build.proj
, it uses version3.0.100-preview7-012821
as expected. However, if I then install3.0.100-preview7-012821
globally, the same command starts using5.0.100-alpha1-013789
from the global install. If the roll-forward is desired, I’d expect it to be independent of whether I happen to have a global install of the version listed in global.json.If I get rid of
use_installed_dotnet_cli
from coreclr’seng/configure-toolset.sh
, I see the same behavior withbuild.sh
(this is on an empty project, but it illustrates the issue):Without a global install of
3.0.100-preview7-012821
:With a global install of
3.0.100-preview7-012821
: