Summary
Surfaced on PR #528 (run 29064641347, job todoapp-avalonia / ios), which only replaces obsolete DisplayAlert with DisplayAlertAsync in TodoApp.Avalonia - it does not touch anything related to iOS or the workload setup. The todoapp-avalonia / ios job (added in #511 / #519) fails in the Build iOS project step:
/Users/runner/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.5/26.5.10284/targets/Xamarin.Shared.Sdk.targets(2570,3):
error : This version of .NET for iOS (26.5.10284) requires Xcode 26.5. The current version of Xcode is 16.4.
Either install Xcode 26.5, or use a different version of .NET for iOS.
See https://aka.ms/xcode-requirement for more information.
[/Users/runner/work/Datasync/Datasync/samples/todoapp/TodoApp.Avalonia/TodoApp.Avalonia.iOS/TodoApp.Avalonia.iOS.csproj]
Job details:
- Runner:
macos-latest → resolved to image macos-15-arm64, version 20260706.0213.1, macOS 15.7.7
- Installed Xcode on that image: 16.4
dotnet workload install ios step succeeds and installs Microsoft.iOS.Sdk.net10.0_26.5 version 26.5.10284, which requires Xcode 26.5
- Build then fails with the version-mismatch error above
Why this looks like an environment/workload issue, not a code issue
The PR diff for #528 only changes a DisplayAlert → DisplayAlertAsync call in TodoApp.Avalonia - nothing in TodoApp.Avalonia.iOS, workload setup, or CI config. The dotnet build output shows the shared TodoApp.Avalonia project (which contains the PR's change) restores and builds fine; the failure happens purely in the Xamarin.Shared.Sdk.targets Xcode-version check for the net10.0-ios head.
Interesting corroborating data point from the same run: the sibling todoapp-maui / ios job (also runs-on: macos-latest, same Xcode 16.4) succeeded. Its dotnet workload install maui-ios step installs multiple iOS SDK pack versions side-by-side:
Installing pack Microsoft.iOS.Sdk.net10.0_26.5 version 26.5.10284...
Installing pack Microsoft.iOS.Sdk.net9.0_18.0 version 18.0.9617...
Installing pack Microsoft.iOS.Sdk.net9.0_26.5 version 26.5.9002...
Installing pack Microsoft.iOS.Sdk.net10.0_26.0 version 26.0.11017...
...and its build actually resolves to Microsoft.iOS.Sdk.net10.0_26.0 (26.0.11017), which is compatible with the installed Xcode 16.4, rather than the newer 26.5 pack. The ios workload (used by TodoApp.Avalonia.iOS, a plain Microsoft.NET.Sdk project referencing Avalonia.iOS) apparently only registers/selects the newest net10.0_26.5 pack and has no fallback, so it hits the hard Xcode-version check instead of negotiating down to a pack compatible with the runner's installed Xcode.
Affected workflow
.github/workflows/build-samples-todoapp-avalonia.yml, job ios:
ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.DOTNET_VERSION }} # 10.0.x
- name: Install iOS workload
run: dotnet workload install ios
- name: Restore iOS project
run: dotnet restore ${{ env.iOSProjectFile }}
- name: Build iOS project
run: dotnet build ${{ env.iOSProjectFile }} --configuration ${{ env.DOTNET_CONFIGURATION }} --no-restore
No Xcode/workload version is pinned; dotnet workload install ios grabs whatever the latest Microsoft.iOS.Sdk.net10.0_* manifest advertises (currently 26.5, which requires Xcode 26.5), regardless of what Xcode version the macos-latest image actually ships (currently 16.4).
Suggested fixes (any of)
- Pin a specific
Microsoft.iOS.Sdk / rollback workload version for the ios workload install (e.g. dotnet workload install ios --version <manifest-version> or a rollback.json) so it matches whatever Xcode ships on macos-latest.
- Pin the runner to a specific macOS image/Xcode version instead of floating
macos-latest (e.g. macos-15 and/or xcode-select to a known-good Xcode, similar to how maccy/xcode-select@... or maxim-lobanov/setup-xcode@v1 could be used), and keep it in sync with the .NET for iOS SDK's requirement.
- Investigate why the plain
ios workload doesn't negotiate down to a compatible pack the way maui-ios does in the same run, and consider aligning TodoApp.Avalonia.iOS's workload install with whatever mechanism lets maui-ios pick net10.0_26.0 automatically.
To reproduce
Run the ios job of .github/workflows/build-samples-todoapp-avalonia.yml (or build-samples-todoapp-maui.yml for a comparison) on macos-latest as of image macos-15-arm64 20260706.0213.1 (Xcode 16.4). The plain ios workload install pulls Microsoft.iOS.Sdk.net10.0_26.5 (26.5.10284) and building net10.0-ios fails with the Xcode-version-mismatch error above.
References
Summary
Surfaced on PR #528 (run 29064641347, job
todoapp-avalonia / ios), which only replaces obsoleteDisplayAlertwithDisplayAlertAsyncinTodoApp.Avalonia- it does not touch anything related to iOS or the workload setup. Thetodoapp-avalonia / iosjob (added in #511 / #519) fails in the Build iOS project step:Job details:
macos-latest→ resolved to imagemacos-15-arm64, version20260706.0213.1, macOS15.7.7dotnet workload install iosstep succeeds and installsMicrosoft.iOS.Sdk.net10.0_26.5version26.5.10284, which requires Xcode 26.5Why this looks like an environment/workload issue, not a code issue
The PR diff for #528 only changes a
DisplayAlert→DisplayAlertAsynccall inTodoApp.Avalonia- nothing inTodoApp.Avalonia.iOS, workload setup, or CI config. Thedotnet buildoutput shows the sharedTodoApp.Avaloniaproject (which contains the PR's change) restores and builds fine; the failure happens purely in theXamarin.Shared.Sdk.targetsXcode-version check for thenet10.0-ioshead.Interesting corroborating data point from the same run: the sibling
todoapp-maui / iosjob (alsoruns-on: macos-latest, same Xcode 16.4) succeeded. Itsdotnet workload install maui-iosstep installs multiple iOS SDK pack versions side-by-side:...and its build actually resolves to
Microsoft.iOS.Sdk.net10.0_26.0(26.0.11017), which is compatible with the installed Xcode 16.4, rather than the newer26.5pack. Theiosworkload (used byTodoApp.Avalonia.iOS, a plainMicrosoft.NET.Sdkproject referencingAvalonia.iOS) apparently only registers/selects the newestnet10.0_26.5pack and has no fallback, so it hits the hard Xcode-version check instead of negotiating down to a pack compatible with the runner's installed Xcode.Affected workflow
.github/workflows/build-samples-todoapp-avalonia.yml, jobios:dotnet workload install iosgrabs whatever the latestMicrosoft.iOS.Sdk.net10.0_*manifest advertises (currently26.5, which requires Xcode 26.5), regardless of what Xcode version themacos-latestimage actually ships (currently 16.4).Suggested fixes (any of)
Microsoft.iOS.Sdk/ rollback workload version for theiosworkload install (e.g.dotnet workload install ios --version <manifest-version>or arollback.json) so it matches whatever Xcode ships onmacos-latest.macos-latest(e.g.macos-15and/orxcode-selectto a known-good Xcode, similar to howmaccy/xcode-select@...ormaxim-lobanov/setup-xcode@v1could be used), and keep it in sync with the .NET for iOS SDK's requirement.iosworkload doesn't negotiate down to a compatible pack the waymaui-iosdoes in the same run, and consider aligningTodoApp.Avalonia.iOS's workload install with whatever mechanism letsmaui-iospicknet10.0_26.0automatically.To reproduce
Run the
iosjob of.github/workflows/build-samples-todoapp-avalonia.yml(orbuild-samples-todoapp-maui.ymlfor a comparison) onmacos-latestas of imagemacos-15-arm6420260706.0213.1(Xcode 16.4). The plainiosworkload install pullsMicrosoft.iOS.Sdk.net10.0_26.5(26.5.10284) and buildingnet10.0-iosfails with the Xcode-version-mismatch error above.References