Skip to content
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

Allow specifying 'latest' as dotnet-version #497

Open
CamJN opened this issue Jan 10, 2024 · 3 comments
Open

Allow specifying 'latest' as dotnet-version #497

CamJN opened this issue Jan 10, 2024 · 3 comments
Labels
feature request New feature or request to improve the current logic

Comments

@CamJN
Copy link

CamJN commented Jan 10, 2024

Description:
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.

@CamJN CamJN added feature request New feature or request to improve the current logic needs triage labels Jan 10, 2024
@aparnajyothi-y
Copy link

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
Copy link

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';

kevinoid added a commit to kevinoid/NetCoreProject that referenced this issue Nov 20, 2024
The version must be specified explicitly due to
actions/setup-dotnet#497 (comment)

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
kevinoid added a commit to kevinoid/NLCaseConvert that referenced this issue Nov 20, 2024
The version must be specified explicitly due to
actions/setup-dotnet#497 (comment)

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
@vRune4
Copy link

vRune4 commented 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!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

6 participants
@kevinoid @CamJN @aparnajyothi-y @shaanmugapriya @vRune4 and others