Closed snwflake closed 1 year ago
hi @snwflake, thank you for the report, we will take a look at it :)
Typo in your fix, should be -rf otherwise it errors with:
rm: cannot remove '/usr/share/dotnet/sdk/7.0.200': Is a directory
@danielriddellsh sorry, should have copy&pasted.
7.0.201 has been released but it’s not picked up by setup-dotnet. Anyone know what’s up?
I just wanted to leave here that one of the workarounds described here worked for me.
What I did was make use of a global.json
file to pin the version of dotnet to 7.0.103
. I also had to make sure that my dotnet
CLI commands were picking up the global.json
file. See the note below.
This fixed the issue for me without having to remove the default installation of dotnet SDK 7.0.200
from the GitHub runner. I just need to make sure that the actions/setup-dotnet@v3
installs a previous working version such as 7.0.103
. You can review here an example of the PRs I've made on my repos to fix this issue: edumserrano/github-issue-forms-parser#28.
Note
As per the global.json overview docs: "The .NET SDK looks for a global.json file in the current working directory (which isn't necessarily the same as the project directory) or one of its parent directories."
This means that you need to be careful regarding what the working directory where you run the
dotnet
CLI commands is to make sure theglobal.json
file is respected.
6.0.* also has breaking issues with dotnet pack --output
as well. This is due to a preview version of MSBuild being tacked onto the setup-dotnet
GHA that I don't think was intended.
It's a terrible release, isn't it? I gotter face strange NETSDK1168 unexpectedly...
My experience seems to be that running any dotnet
command in conjunction with v3
of this action is using the latest SDK, even though I specify 6.0.x
in the setup-dotnet
action.
Falling back to v2
of this action produces the expected behavior.
Hi, @tgrnwd 👋 The v3
release contains some breaking changes and it's behaviour is different from v2
version. Please, refer to this part of documentation to get additional information https://github.com/actions/setup-dotnet#usage.
@IvanZosimov Ah, thank you. I'm certain I read this, but didn't fully understand at that time.
I'm closing this issue as the NET SDK 7.0.201 was released and it seems to solve the problem.
Description: For reference: https://github.com/dotnet/sdk/issues/30624
The MSBuild preview version provided with 7.0.200 introduced breaking changes and generally ill-formed behavior.
Pinning the version to anything below 7.0.200, ie. 7.0.103 does not resolve that issue, as the same MSBuild preview is still being used.
My workaround so far has been to add another step after the dotnet-setup which just removes 7.0.2* sdk versions. Only then started my build to produce working output with proper viewcomponents.
Task version: 926f442
Platform:
Runner type:
Repro steps:
Notes: While this is a bug introduced by the SDK, I still wanted to raise this issue here, to spare others from wasting 3 hours debugging it. The workaround for me is currently the following until the announced hotfix 7.0.201 goes live: