-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
global.json is ignored unless the SDK version is an exact match for a currently installed SDK #13799
Comments
This is expected behavior as the third value of the SDK version (x.x.Xxx) is the feature band. The roll forward behavior only applies to the patch, which is the last two digits of the version (x.x.xXX). Please refer to the docs for more information, thanks |
Roll forward behaviour was specifically set to The docs specify that the So, if I'm reading that correctly, the latest dotnet version with the same major (3) and minor (1) version should be selected after the given version. If roll forward behaviour only applies to the patch, then |
Apologies, I misunderstood your issue, reopening. So to clarify, the issue is that you are specifying a 3.1 SDK in your global.json and it is rolling forward to 5.0? |
No worries at all, and yep. If a 3.1 SDK is specified in global.json and that exact However I was just doing some additional testing (double checking the other I'm assuming that I've given myself false memories of testing this with a non-zero feature level and this is actually a non-issue after all 😣 From what I can tell, the docs don't specifically prohibit a "0" feature level, so this may still be an issue (either on the SDK side or the docs side), but I'll close this issue for now and re-open a new one for the feature level if you think it's warranted. |
Not sure if should open new issue, but kind of appears to be similar to this one. Noticed in our {
"sdk": {
"version": "6.0.403",
"rollForward": "latestFeature"
}
} We can see However, in the Windows environment, everything built fine on When I updated our global.json to call out Is this an issue with |
Issue Title
global.json
is ignored unless the SDK version is an exact match for a currently installed SDK.General
global.json
SDKversion
androllForward
behaviour appears to be ignored if theversion
string is not an exact match for one of the .NET SDK versions currently installed on the machine. This has unintended consequences when building code on different machines with different dotnet SDKs installed.This occurs on dotnet host 5.0.0-rc.1.20451.14, I have not yet tested on previous dotnet hosts.
Example
The simplest example is if
global.json
specifies an SDK version3.1.000
, because 3.1.000 is not an SDK version that exists.global.json
:For reference, here are the currently installed SDKs on my machine:
Expected behaviour:
The dotnet host should pick the latest feature version of dotnet core 3.1, which is 3.1.402.
dotnet --info
should start with the text:Observed behaviour:
The dotnet host picks the latest installed version of dotnet, which is
5.0.100-rc.1.20452.10
.The SDK
version
androllForward
behaviour appears to be ignored.dotnet --info
starts with the text:This issue occurs with any SDK version that is not currently installed on the machine For example, using
global.json
:will roll forward to 3.1.402 on my local machine because SDK 3.1.201 is installed, but will jump all the way to 5.0.100-rc.1.20452.10 on our build server because SDK 3.1.201 is not present on that machine. This is problematic because the build server (and also development machines) must have all SDKs installed to account for all possible variations of global.json.
The text was updated successfully, but these errors were encountered: