Skip to content

Script crashes when rollForward feature is set to latestMinor #448

Closed

Description

@nZeus

Description:
When rollForward is set to latestMinor and sdk.version is set to 7.0.0, I expect the script to use the latest installed version of .NET SDK (https://learn.microsoft.com/en-us/dotnet/core/tools/global-json).
But instead the script crashes with Failed to install dotnet error:

Run actions/setup-dotnet@v3
  
/home/runner/work/_actions/actions/setup-dotnet/v3/externals/install-dotnet.sh --version 7.0.0
dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.0/dotnet-sdk-7.0.0-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetcli.azureedge.net/dotnet/Sdk/7.0.0/dotnet-sdk-7.0.0-linux-x64.tar.gz' is not available.
dotnet-install: Attempting to download using primary link https://dotnetbuilds.azureedge.net/public/Sdk/7.0.0/dotnet-sdk-7.0.0-linux-x64.tar.gz
curl: (22) The requested URL returned error: 404
dotnet-install: The resource at primary link 'https://dotnetbuilds.azureedge.net/public/Sdk/7.0.0/dotnet-sdk-7.0.0-linux-x64.tar.gz' is not available.
dotnet_install: Error: Could not find `.NET Core SDK` with version = 7.0.0
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support
Error: Failed to install dotnet, exit code: 1. dotnet_install: Error: Could not find `.NET Core SDK` with version = 7.0.0
dotnet_install: Error: Refer to: https://aka.ms/dotnet-os-lifecycle for information on .NET Core support

Task version:
Specify the task version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted

Repro steps:

  • ubuntu-22.04 runner (with pre-installed .NET SDK 7.0.306)
  • global.json:
{
  "sdk": {
    "version": "7.0.0",
    "rollForward": "latestMinor"
  }
}

Expected behavior:
The script should use the highest installed minor version of .NET SDK

Actual behavior:
An error: Failed to install dotnet, exit code: 1. dotnet_install: Error: Could not find '.NET Core SDK' with version = 7.0.0

Activity

  1. added
    bug
    on Aug 15, 2023
  2. nikolai-laevskii commented on Aug 16, 2023

    @nikolai-laevskii
    Contributor

    Thank you for the detailed description of the issue! We will investigate it and come back with an update.

  3. self-assigned this
    on Aug 23, 2023
  4. IvanZosimov commented on Aug 23, 2023

    @IvanZosimov
    Contributor

    Hi, @nZeus 👋 Unfortunately, the setup-dotnet currently supports only one rollForward option - latestFeature. I'm going to transform this bug report to the feature request.

  5. added
    feature request
    and removed
    bug
    on Aug 23, 2023
  6. removed their assignment
    on Aug 24, 2023
  7. Strepto commented on Oct 22, 2025

    @Strepto

    Hi, @nZeus 👋 Unfortunately, the setup-dotnet currently supports only one rollForward option - latestFeature. I'm going to transform this bug report to the feature request.

    Is this documented anywhere? I would suggest adding an error message to the setup-dotnet when it sees a global.json with an unsupported rollForward, as this is really not intuitive and I had to spend quite a lot of time tracking down this issue.

  8. Frulfump commented on Oct 22, 2025

    @Frulfump

    Using .NET 10 SDK RC2 with the global.json above

    {
      "sdk": {
        "rollForward": "latestMinor",
        "version": "7.0.0"
      }
    }

    I get this when I do dotnet --info

    ...
    global.json file:
      Invalid [path]
        Version '7.0.0' is not valid for the 'sdk/version' value. SDK feature bands start at 1 - for example, 7.0.100
    ...
    

    So setup-dotnet shouldn't support that exact version at least but it should absolutely support the different rollForward options (with a valid version field).

    Do you get a different result if you choose a valid version field?

    Unfortunate that the linked PR has been un-reviewed for more than 1 year...

  9. v-priyagupta108 commented on May 28, 2026

    @v-priyagupta108
    Contributor

    We're happy to inform you that PR #538, which adds support for the latest* variants of the rollForward policy (latestPatch, latestFeature, latestMinor, and latestMajor) in global.json, has been successfully merged!

    The action now resolves and installs the appropriate SDK version at setup time based on the specified rollForward policy in your global.json.

    To start using this feature, you can reference the actions/setup-dotnet@main branch in your workflows for now. The changes will be included in the upcoming releases.

    Please let us know if you continue to see any issues or need any further assistance. Thank you for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions