Skip to content

Fix Uno CI jobs failing in uno-check after runner image added .NET 11 SDK - #893

Open
nmetulev wants to merge 1 commit into
mainfrom
nmetulev-fix-uno-ci-workload-install
Open

nmetulev wants to merge 1 commit into
mainfrom
nmetulev-fix-uno-ci-workload-install

Conversation

@nmetulev

Copy link
Copy Markdown
Collaborator

Fixes

All 8 Uno matrix jobs (build (2|3, android|ios|macos|wasm)) fail in the uno-check step on every PR (e.g. #892, run https://github.com/CommunityToolkit/Windows/actions/runs/44863951800):

Workload installation failed: Workload pack 'Microsoft.NET.Runtime.MonoAOTCompiler.Task.net10' in manifest 'microsoft.net.workload.mono.toolchain.net10' [...\sdk-manifests\11.0.100\...] conflicts with manifest 'microsoft.net.workload.mono.toolchain.current' [...\sdk-manifests\10.0.100\...]
Checkup had Error status: dotnetworkloads-10.0.101

Root cause: runner image windows-2025-vs2026 20261116 now ships the .NET 11 SDK (11.0.100). uno.check 1.34.1 requires SDK 10.0.101 (non-exact). When that exact version isn't installed, it falls back to the newest SDK on the machine (ignoring our global.json) and runs dotnet workload install from a temp folder whose generated global.json pins that SDK. So the .NET 10 workload rollback gets installed with the .NET 11 SDK, which conflicts. The log shows it: SetEnvironmentVariable: DOTNET_SDK_VERSION=11.0.100, dotnet workload list returns {"installed":[]}, and Mono 11.0.0 packs get downloaded.

Before the image update, the newest SDK on the runner was the 10.0.4xx one that global.json selects, so uno-check and MSBuild agreed.

PR Type

  • Build or CI related changes

What is the current behavior?

uno-check installs workloads with the .NET 11 SDK, fails, and every Uno job goes red before compilation.

What is the new behavior?

A new step runs before uno-check in the build and package jobs. It removes any SDK newer than the one global.json resolves to (dotnet --version in the repo root), so uno-check falls back to the same SDK we build with. This is the same state the runner was in before the image update. The step also moves forward automatically if global.json later moves to .NET 11.

Alternatives considered:

  • Bump uno.check to 1.35.x: its manifest targets the 11.0.100 workload band, which doesn't match our global.json (10.0.4xx), so the build would be missing workloads.
  • uno-check CLI flag: there isn't an option to choose the SDK version.
  • tooling submodule: not involved. The uno-check steps live in this repo's build.yml.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs: validated by this PR's CI run, since the hosted runner can't be reproduced locally. The SDK filter logic was tested locally against a fake sdk folder (8.0.428, 10.0.303, 10.0.404, 10.0.500-rc.1.1, 11.0.100, 11.0.100-preview.7… with selected 10.0.404 → removed only the 10.0.500 RC and the 11.0.x entries).
  • Tests for the changes have been added (if applicable): N/A, CI-only change
  • Header has been added to all new source files: N/A
  • Contains NO breaking changes

Other information

uno-check could also respect global.json when it picks an SDK. That would be worth raising upstream in unoplatform/uno.check.

Runner image windows-2025-vs2026 20261116 ships the .NET 11 SDK (11.0.100). uno-check 1.34.1 requires SDK 10.0.101 (non-exact), and when that exact version is missing it falls back to the newest installed SDK, ignoring global.json. It then installs the .NET 10 workload rollback with the .NET 11 SDK, which fails with a mono toolchain manifest conflict and breaks every Uno (android/ios/macos/wasm) job.

Remove SDKs newer than the one global.json selects before running uno-check, so workloads are installed for the SDK the build actually uses.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant