GeezerVison is showing github.com — Allow specifying 'latest' as dotnet-version · Issue #497 · actions/setup-dotnet
Allow specifying 'latest' as dotnet-version #497DescriptionDescription:
A workflow with the following would install the latest major version of dotnet.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: latest
Justification:
It would be nice to be able to just stick latest in the dotnet-version field and not have to update the tag when a new major version comes out. This is available in the node and ruby setup actions and is quite nice.
Are you willing to submit a PR?
Unlikely. Reacted by Kevin Locke, Rune Moberg, Henrik Røn, Rasmus Sigsgaard, Stephen Klancher, Andy Zivkovic, Frulfump, Vlad Ionescu and Jeffrey Rehm Activityv-aparnajyothi-y commented on Jan 10, 2024 Hello @CamJN,
Thank you for creating this issue, we will investigate it and come back to you as soon as we have some feedback. kevinoid commented on Nov 20, 2024 I'd also appreciate this feature. For reference, it is currently possible to install the latest LTS version with:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: x
Unfortunately, this always installs a version from the LTS channel due to
|
// If "dotnet-version" is specified as *, x or X resolve latest version of .NET explicitly from LTS channel. The version argument will default to "latest" by install-dotnet script. |
|
this.resolvedArgument.value = 'LTS'; |
vRune4 commented on Dec 6, 2024 I'm utterly confused.
AFAICT the docs state that the latest SDK should be able to build projects that target older versions.
So why would I ever want to lock down the SDK version? Isn't the 80% use case that you'd want to build using the latest project and not have to mess around with strange global.json files?
I have a reusable workflow shared by several projects. These projects will gradually move towards whatever is the latest .net version. They currently do not have a global.json file. I see dependabot can be used to update global.json. (again: why would I want this? Just use the latest SDK already!) guardrex commented on Jan 14, 2025 It's been a year, would someone prioritize this for work? Having to update the version every .NET SDK major release is a pain, and this Action is now being used by an official Microsoft samples repo (dotnet/blazor-samples). Reacted by Rasmus Sigsgaard, Frulfump and Vitalii Kotenko ericsampson commented on Mar 7, 2025 useless comment, but good to see @guardrex still fighting to make things better after all these years 👍 Reacted by Luke Latham, Rune Moberg and Frulfump Frulfump commented on Aug 17, 2025 Is latest here referring to (public) preview, latest stable or latest nightly (called daily for the quality with this action) build? I'd like all three of those options to be available. I think it makes most sense if "latest" by default means latest stable and then use a channel option to control if you get the others. EDIT: Also seems like there's an additional option supported in the install script called -Quality | ----quality
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#options
docs for --quality
Downloads the latest build of the specified quality in the channel. The possible values are: daily, preview, and GA.
The different quality values signal different stages of the release process of the SDK or Runtime installed.
daily: The latest builds of the SDK or Runtime. They're built every day and aren't tested. They aren't recommended for production use but can often be used to test specific features or fixes immediately after they are merged into the product. These builds are from the dotnet/installer repo, and so if you're looking for fixes from dotnet/sdk you must wait for code to flow and be merged from SDK to Installer before it appears in a daily build.
preview: The monthly public releases of the next version of .NET, intended for public use. Not recommended for production use. Intended to allow users to experiment and test the new major version before release.
GA: The final stable releases of the .NET SDK and Runtime. Intended for public use as well as production support.
The --quality option works only in combination with --channel, but is not applicable for the STS and LTS channels and will be ignored if one of those channels is used.
For an SDK installation, use a channel value that is in A.B or A.B.Cxx format. For a runtime installation, use channel in A.B format.
Don't use both version and quality parameters. When quality is specified, the script determines the proper version on its own.
Available since the 5.0 release.
Sadly there isn't much attention paid to either issues or community PRs for this repo so I think it's better to either fork this repo or just use the install scripts from Microsoft directly. https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script I wonder why they don't let GitHub Copilot try to fix the currently 34 open issues and review the currently 22 open PRs, we could be done within a week. v-priya-kinthali commented on Apr 16, 2026 Hello Everyone👋! We have raised PR#730 which adds dotnet-version: latest support along with an optional dotnet-channel input. Any feedback or suggestions would be welcome. Thanks in advance! Reacted by Frulfump Reacted by Luke Latham and Kevin Locke Reacted by Frulfump v-mahabaleshwars commented on Apr 29, 2026 Hi @CamJN,
This has been addressed via #730, now merged into main.
The action supports dotnet-version: latest to automatically install the highest active .NET SDK, along with an optional dotnet-channel input (LTS, STS, A.B, A.B.Cxx) to filter the resolved version. This will be available in the next release.
Closing as completed. Reacted by Kevin Locke and Luke Latham
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|