Open
Description
Describe the bug
global.json SDK version and rollForward behaviour appears to be ignored if the version string doesn't contains exactly [major version].[minor version].[feature brand]
To Reproduce
By default dotnet --info
provide me these info :
Environnement d'exécution :
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.101\
Host:
Version: 7.0.1
Architecture: x64
Commit: 97203d38ba
.NET SDKs installed:
5.0.100-rc.2.20479.15 [C:\Program Files\dotnet\sdk]
5.0.415 [C:\Program Files\dotnet\sdk]
6.0.402 [C:\Program Files\dotnet\sdk]
7.0.101 [C:\Program Files\dotnet\sdk]
In a project with a global.json :
❯ cat .\global.json; dotnet --version
{
"sdk": {
"version": "6.0",
"rollForward": "latestMinor"
}
}
7.0.101
I expected that dotnet --version
provide me 6.0.402
By modifying the global.json file :
❯ cat .\global.json; dotnet --version
{
"sdk": {
"version": "6.0.0",
"rollForward": "latestMinor"
}
}
6.0.402
I don't understand why, the version need to be fully qualified ?
The version specified in the global.json file should be considered identically : "version": "6"
= "version": "6.0"
= "version": "6.0.0"