-
Notifications
You must be signed in to change notification settings - Fork 976
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
NETSDK1139: The target platform identifier android was not recognized on windows-2022 image version 20241113.3.0 #3578
Comments
For reference, the difference between the two seems to be the "runner image" specifically. The fail happened on 20241113.3.0, while the pass happened on 20241021.1.0. This is visible both in the "setup job" step after you expand the "Runner Image" subhead, or when viewing the raw logs. See also: actions/runner-images#10978 |
Awesome, thanks @bdach - I didn't spot that. That at least gives me a path to explore. As is pointed out in the other issue you referenced, it's a bit frustrating that the runners aren't versioned and we can't pin a specific version to ensure deterministic builds. Ideally I'd like every change in the build system to be reflected by a corresponding change in our repository. The runners themselves seem to change frequently and in major ways however, so sometimes things work and sometimes things break, without our having made any changes. |
Does anyone have a workaround for this? I even tried using a specific version of dotnet SDK, but it still complains about https://github.com/nalu-development/nalu/actions/runs/11950637082/job/33312535560
|
This is breaking our android builds too. |
You might try manually specifying the dotnet version via the --version flag to the workload install command. Or specify the version in a global.json file for your solution. |
it's not enough to do an sdk install of 8.0.x as 9.0.x is already on the build image you can workaround this by pinning the .net sdk version by doing the following
|
Turns out the direct reason behind this (at least in our repos which target .NET 8) is that the See: dotnet/sdk#45204 |
Similar story here. GitHub Actions As GitHub gradually transitioned to this latest image version, we started seeing intermittent We were originally setup with
And the following GitHub Action steps:
When we started seeing The fix (workaround) that worked for us is as follows:
Thank you to everyone who has participated in this thread, you've really helped us out. |
any update on this issue ? We tried workarounds mentioned and they didnt work for us |
Describe the bug
We started getting this error when running dotnet restore on our Windows runners for any projects targeting net8.0-android 2 days ago:
To Reproduce
We don't consistently get this error for the same commit. For example in this build run you can see that in Attempt 1, dotnet restore succeeded. However
dotnet restore
failed a second attempt on exactly the same commit.As @bdach pointed out, the difference appears to be in the specific image version:
Expected behavior
I'd expect the build runs to be deterministic. If we run the same GitHub Actions workflow with the same commit on the same runner, we should get the same result.
.NET 8 is definitely installed on the runner as are the maui workloads. So the error itself seems erroneous and misleading.
Runner Version and Platform
windows-latest
version: '2.320.0'`What's not working?
Here's an example of a run that (would have) succeeded... you can see the
Restore .NET dependencies
step has succeeded. This just runsdotnet restore
against our solution (which has some projects that targetnet8.0-android
).After I saw that step had succeeded, I cancelled the run and tried again. Here's a retry of exactly the same commit that failed:
And here's a small sample of the log output for that step on the failed attempt:
The text was updated successfully, but these errors were encountered: