Skip to content

ci: pin iOS workload set + Xcode version for todoapp-avalonia/maui iOS builds#530

Merged
adrianhall merged 4 commits into
CommunityToolkit:mainfrom
adrianhall:issues/529
Jul 10, 2026
Merged

ci: pin iOS workload set + Xcode version for todoapp-avalonia/maui iOS builds#530
adrianhall merged 4 commits into
CommunityToolkit:mainfrom
adrianhall:issues/529

Conversation

@adrianhall

Copy link
Copy Markdown
Collaborator

Summary

Fixes #529.

todoapp-avalonia / ios (and, latently, todoapp-maui / ios) call dotnet workload install ios / maui-ios unpinned, which always resolves the newest published Microsoft.iOS.Sdk.net10.0_* pack. As of workload set 10.0.108, that's 26.5.10284, which requires Xcode 26.5 - not installed on either the macOS-15 or macOS-26 runner images currently backing the macos-latest label during its migration window (see actions/runner-images#14167, rollout through 2026-07-15), causing the

This version of .NET for iOS (26.5.10284) requires Xcode 26.5. The current version of Xcode is 16.4.

failure from #529. This also explains why the failure looked flaky: the same commit passed and failed todoapp-avalonia / ios ~26 minutes apart on main/a PR run of #528, purely because macos-latest landed on a different underlying image each time.

What changed

Both todoapp-avalonia / ios and todoapp-maui / ios jobs now:

  1. Pin runs-on to macos-15 (instead of macos-latest) so the Xcode version available on the runner is deterministic during the macos-latest migration window, rather than randomly landing on macOS-15 or macOS-26.
  2. Explicitly select Xcode 26.3 via sudo xcode-select -s /Applications/Xcode_26.3.app. Xcode 26.3 is already installed on the macos-15 image, just not the default (16.4).
  3. Pin the iOS workload install to workload set 10.0.107 via dotnet workload install ios/maui-ios --version 10.0.107, scoped only to that job's env/steps (not a repo-wide global.json). 10.0.107 is the last workload set before the iOS/MacCatalyst/macOS/tvOS manifest moved to the 26.4/26.5 pack line, resolving to Microsoft.iOS.Sdk.net10.0_26.2 (26.2.10233), which requires exactly Xcode 26.3 - matching step 2. It keeps other manifests (Android, MAUI) at their latest versions, so those jobs are unaffected.

Why not a per-project TargetPlatformVersion/ValidateXcodeVersion override, or a repo-root global.json?

  • A per-project MSBuild property fix would need to be applied individually to TodoApp.Avalonia.iOS.csproj, TodoApp.MAUI.csproj, and (once #506 is resolved) TodoApp.Uno.csproj - and wouldn't protect any future mobile sample from hitting the same issue.
  • A repo-root global.json pinning sdk.workloadVersion was tried first, but it forces every dotnet build/restore in the whole repo (via Microsoft.NET.Sdk.ImportWorkloads.props) to require that exact workload version to already be installed - even for projects with zero workload dependency. This broke todoapp-mvc, todoapp-blazor-wasm, datasync-server, etc. on a fresh runner (confirmed via a real run). dotnet workload install ... --version scoped to just the ios job's own steps avoids this entirely.
  • Checked back through every published workload set since 10.0.100 (2025-11-11): none currently declare an iOS _RecommendedXcodeVersion anywhere near 16.4 (they range from 26.0 through 26.5), so pinning the workload version alone isn't sufficient - the explicit xcode-select step is required too. This was confirmed by first testing the workload pin alone, which failed the same way against 26.2.10233 requiring Xcode 26.3.

Validation

Ran the full build-samples.yml via workflow_dispatch on this branch twice to confirm the fix is deterministic, not a flaky pass:

Both android jobs (unpinned, unaffected by the ios-job-scoped changes) passed in both runs, confirming no regression there.

todoapp-uno is intentionally left untouched - it's not wired into build-samples.yml yet (blocked by #506), and will need the same treatment when it's re-enabled.

Follow-up

Revisit both ios jobs once we deliberately upgrade to a newer, Xcode-26-compatible workload set (both the runs-on: macos-15 pin and the xcode-select step are called out inline as things to revisit then).

ahall and others added 4 commits July 10, 2026 09:54
…ch (CommunityToolkit#529)

todoapp-avalonia / ios and todoapp-maui / ios both call 'dotnet workload
install ios' / 'maui-ios' unpinned (loose-manifests mode), which always
resolves the newest published Microsoft.iOS.Sdk.net10.0_* pack. As of
workload set 10.0.108, that's 26.5.10284, which requires Xcode 26.5 -
not installed on either macOS-15 or macOS-26 runner images currently
backing the macos-latest label during its migration window (see
actions/runner-images#14167), causing intermittent
'This version of .NET for iOS (26.5.10284) requires Xcode 26.5' build
failures.

- Add repo-root global.json pinning sdk.workloadVersion to 10.0.107,
  the last workload set before the iOS/MacCatalyst/macOS/tvOS manifest
  moved to the 26.4/26.5 pack line, while keeping the MAUI (10.0.20)
  and Android (36.1.53) manifests at their latest versions. This
  applies automatically to every 'dotnet workload install' call in CI
  (including the currently-disabled todoapp-uno / ios-maccatalyst job,
  once CommunityToolkit#506 is resolved and it's wired back in) with no per-job or
  per-project edits needed.
- Pin the todoapp-avalonia / ios and todoapp-maui / ios jobs to
  macos-15 (instead of macos-latest) as defense-in-depth so the Xcode
  version these jobs build against is deterministic during the
  migration window, rather than randomly landing on macos-15 or
  macos-26.
…ommunityToolkit#529)

The repo-root global.json approach broke every other sample build
(todoapp-mvc, todoapp-blazor-wasm, datasync-server, etc.) on a fresh
runner with:

  error MSB4242: SDK Resolver Failure: ... Workload version 10.0.107,
  which was specified in .../global.json, was not found. Run
  'dotnet workload restore' to install this workload version.

Microsoft.NET.Sdk.ImportWorkloads.props enforces the pinned workload
version for every 'dotnet build'/'restore' invocation whose cwd falls
under a global.json declaring sdk.workloadVersion - regardless of
whether that specific project has any workload dependency - and it's
not satisfied lazily; it must already be installed. Confirmed via a
real workflow_dispatch run (see
https://github.com/adrianhall/CommunityToolkit-Datasync/actions/runs/29081276609).

Replaced with 'dotnet workload install ios/maui-ios --version 10.0.107'
scoped to just the ios job's env/steps in each affected workflow. This
pins only that job's install (and the restore/build steps that follow
it on the same runner), leaving every other job - including the
android jobs in the same workflows - on unpinned/latest workload
resolution.
…mmunityToolkit#529)

Testing the --version 10.0.107 workload pin alone (previous commit) still
failed on macos-15:

  error: This version of .NET for iOS (26.2.10233) requires Xcode 26.3.
  The current version of Xcode is 16.4.

Confirmed via a real workflow_dispatch run
(https://github.com/adrianhall/CommunityToolkit-Datasync/actions/runs/29081474204)
that both todoapp-avalonia/ios and todoapp-maui/ios resolve to the SAME
newest-available pack within the pinned workload set (26.2.10233,
_RecommendedXcodeVersion=26.3 per Microsoft.iOS.Sdk.Versions.props),
not an older Xcode-16.4-compatible one - there is no currently-published
net10.0 iOS SDK pack (checked back to workload set 10.0.100, published
2025-11-11) whose _RecommendedXcodeVersion is anywhere close to 16.4, so
no workload-version pin alone can satisfy macos-15's default Xcode.

Per actions/runner-images' macos-15 Readme, Xcode 26.3 IS already
installed on the image (just not the default) at
/Applications/Xcode_26.3.app, alongside 26.0.1/26.1.1/26.2. Added a
'sudo xcode-select -s' step to explicitly select it, matching the
26.2.10233 pack's requirement, instead of installing anything extra.
@adrianhall adrianhall merged commit 398792f into CommunityToolkit:main Jul 10, 2026
15 checks passed
@adrianhall adrianhall deleted the issues/529 branch July 10, 2026 10:12
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.

CI: todoapp-avalonia / ios build fails - .NET for iOS 26.5 requires Xcode 26.5, macos-latest only has Xcode 16.4

1 participant