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
Incorrect Dotnet Version Displayed in GitHub Actions Workflow #504
Comments
Hello @adilhusain-s |
Hi @adilhusain-s, When an earlier version of the SDK is needed, you to specify that version in a global.json file. The process for selecting an SDK version is: Please refer this link for official reference. |
I think this should be considered a breaking change even though it isn't documented that way. My team's workflows are built with the assumption that only the dotnet version we requested will be installed. My team is rolling back to v2 because our workflows are now building code using the wrong .NET version. Either this change should be reverted, or it should be moved to the "breaking changes" section of the release notes. |
Hello @BrandonDusseau! The modifications are officially from .NET/Microsoft and not from setup-dotnet, hence they can't be classified as a breaking change. Please feel free to reach us if you face any other issues. |
@mahabaleshwars I'm not certain that's correct. When we used At this point in time we did not use It seems like v4 installing the latest LTS version (see #433 - I haven't taken a lot of time to try and interpret this PR so I may be wrong) may be related to this, but I'm not sure. Please correct me if I'm wrong, but I believe this is new setup-dotnet behavior and not a change on the Microsoft side. This does seem like a breaking behavior change for any projects not using 8.0+ and that do not have a global.json file present. |
Hello @BrandonDusseau! Here's what you can expect with setup-dotnet@v4: It ensures a minimal installation of the latest runtime version to get the most up-to-date stable dotnet executable. |
Description:
I was attempting to use multiple .NET versions in my GitHub Actions workflow, and I observed that the
dotnet --version
command consistently prints the version of .NET SDK 8.0, even though I specified other versions. I followed the official workflow example from the documentation, where it successfully uses 3.0 and 6.0 versions. However, in my workflow run (link: workflow run), it consistently displays the version as 8.0.Task version:
[Specify the task version]
Platform:
Runner type:
Steps to Reproduce:
Expected Behavior:
The
dotnet --version
command should correctly display the specified .NET versions in the workflow matrix.Actual Behavior:
The
dotnet --version
command consistently displays the version as 8.0.The text was updated successfully, but these errors were encountered: