Skip to content

@v4 doesn't install the latest cli #621

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

Closed
2 of 5 tasks
taspeotis opened this issue Apr 4, 2025 · 5 comments
Closed
2 of 5 tasks

@v4 doesn't install the latest cli #621

taspeotis opened this issue Apr 4, 2025 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@taspeotis
Copy link

Description:

// Use latest stable version
.useArguments(IS_WINDOWS ? '-Channel' : '--channel', 'LTS')

This says it unconditionally installs "the latest stable version" but it doesn't, it installs LTS (8). STS would be the latest stable version (9).

Task version:

v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

Run the task, although note whatever version of .NET you ask for is irrelevant, this is about the step that unconditionally installed the dotnet runtime to get at dotnet.

- uses: actions/setup-dotnet@v4
  with:
    dotnet-version: '9.x'

Expected behavior:

.NET 9 runtime is installed before the user specified version.

Actual behavior:

.NET 8 runtime is installed before the user specified version.

@taspeotis taspeotis added bug Something isn't working needs triage labels Apr 4, 2025
@taspeotis
Copy link
Author

Separately I think it would be nice if the .NET runtime was not unconditionally installed: I believe it's redundant to install it if the SDK is the same version as the runtime, or a newer version.

@priyagupta108
Copy link
Contributor

Hello @taspeotis,
Thank you for your report. We'll investigate the issue and get back to you with the details!

@chiranjib-swain
Copy link

Hello @taspeotis 👋,

The new setup-dotnet@v4 installation script is designed to be more reliable by running twice, resolving issues from the previous version (v3). Here's a breakdown of what happens:

  1. Minimal Installation: The script first installs the latest .NET runtime to ensure you have the newest stable version of the dotnet executable.
  2. SDK Installation: Next, it installs the specific .NET SDK version you requested.

By running these steps separately, we've fixed a problem (#387) where the dotnet executable was overwritten during each run, sometimes causing errors because the executable was still in use.

In version 4, we've added an additional step that installs the Long-Term Support (LTS) version of the dotnet executable. This ensures that the executable is only downloaded once per workflow, which helps improve reliability (addressing PR #433).

You can access the complete .NET Release Notes for further information.

Let us know if you have any further questions or concerns about the two-step installation process!

@taspeotis
Copy link
Author

You can close it if it's working by design, but like I linked to: the code says it installs the latest version.

You say: "The script first installs the latest .NET runtime to ensure you have the newest stable version of the dotnet executable." and then it installs LTS, not STS.

STS is the latest. STS is the newest stable version.

@chiranjib-swain
Copy link

Hello @taspeotis 👋,

Thank you for bringing this to our attention. Just to clarify, we included this script with the goal of installing the latest Long-Term Support (LTS) version, which you can find detailed in the release notes here.

Thanks again for your feedback—it really helps us improve. If you have more suggestions, please don’t hesitate to reach out.

Since this addresses the concern, I’ll go ahead and close this ticket. Feel free to reopen it or create a new issue if you encounter any further problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants
@taspeotis @priyagupta108 @chiranjib-swain and others