.NET CLI installing SDK via global.json file

97 Views Asked by At

When using the --jsonfile flag of the [dotnet-install script]1 I am getting some unexpected behavior with the rollForward property set to latestFeature

My global.json file referenced:

{
    "sdk": {
        "version": "6.0.416",
        "rollForward": "latestFeature"
    }
}

as of today (11/29/2023), there exists a newer version 6.0.417 of the SDK which was released November 14, 2023. My expectation based on the similar example provided in the the documentation, is that with the rollForward property set to latestFeature, I should get 6.0.417 installed in my CI environment with the above global.json file - however, I'm getting the exact version (6.0.416) that is specified in the global.json file.

Documentation example indicates:

"The following example shows how to use the latest feature band and patch version installed of a specific major and minor version. The JSON shown disallows any SDK version earlier than 3.1.102 and allows 3.1.102 or any later 3.1.xxx version, such as 3.1.103 or 3.1.200."

{
  "sdk": {
    "version": "3.1.102",
    "rollForward": "latestFeature"
  }
}

CI environment output:

[Container] 2023/11/29 18:06:38.363022 Running command /usr/local/bin/dotnet-install.sh --jsonfile global.json
dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.416/dotnet-sdk-6.0.416-linux-x64.tar.gz
dotnet-install: Remote file https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.416/dotnet-sdk-6.0.416-linux-x64.tar.gz size is 186347163 bytes.
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.416/dotnet-sdk-6.0.416-linux-x64.tar.gz
dotnet-install: Downloaded file size is 186347163 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Installed version is 6.0.416
dotnet-install: Adding to current process PATH: `/root/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

[Container] 2023/11/29 18:06:47.220747 Running command dotnet --version
6.0.416
0

There are 0 best solutions below