Skip to content

Workaround CoreCLR R2R integration test build failures on macCatalyst and Windows#34304

Draft
mattleibow wants to merge 1 commit intonet11.0from
fix/disable-coreclr-r2r-integration-test
Draft

Workaround CoreCLR R2R integration test build failures on macCatalyst and Windows#34304
mattleibow wants to merge 1 commit intonet11.0from
fix/disable-coreclr-r2r-integration-test

Conversation

@mattleibow
Copy link
Copy Markdown
Member

@mattleibow mattleibow commented Mar 2, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description

The SimpleTemplateTest.Build integration test with UseMonoRuntime=false EnablePreviewFeatures=true (CoreCLR R2R) fails to build on certain platform TFMs:

  • macOS — macCatalyst: R2R compiled objects target macCatalyst 15.2 but the linker expects deployment target 15.0
  • Windows — iOS + macCatalyst: crossgen2 executable is missing for Apple cross-compilation

Android, iOS (on macOS), and Windows TFMs build fine. This has been failing on every net11.0 build since Jan 27 (46/47 tests pass, this 1 fails), and causes the Windows job to timeout after ~2 hours.

Workaround

This PR removes only the broken TFMs per platform so the test still validates CoreCLR R2R on the working ones:

  • macOS: Removes macCatalyst → test builds Android + iOS
  • Windows: Removes macCatalyst + iOS → test builds Android + Windows

The underlying issue needs to be fixed upstream in the .NET SDK/runtime toolchain.

Changes

SimpleTemplateTest.cs: When UseMonoRuntime=false, removes broken TFMs from the generated csproj before building. Uses OperatingSystem.IsWindows() to conditionally also remove iOS on Windows (where crossgen2 is missing for Apple targets).

Issues

Workaround for #34303 — upstream fix needed in .NET SDK/runtime.

Copilot AI review requested due to automatic review settings March 2, 2026 21:40
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 2, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34304

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34304"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Disables a single failing integration test scenario in Microsoft.Maui.IntegrationTests on the net11.0 branch to unblock CI while the underlying CoreCLR/R2R toolchain issues are tracked in #34303.

Changes:

  • Commented out the SimpleTemplateTest.Build InlineData case that sets UseMonoRuntime=false EnablePreviewFeatures=true.
  • Added inline comments describing the failure modes and linking to the tracking issue.

@mattleibow mattleibow force-pushed the fix/disable-coreclr-r2r-integration-test branch from 5bf8a51 to 4766ba0 Compare March 2, 2026 21:52
@mattleibow mattleibow changed the title Disable CoreCLR R2R integration test failing on net11.0 Fix CoreCLR R2R integration test to only build for Android Mar 2, 2026
@mattleibow mattleibow changed the title Fix CoreCLR R2R integration test to only build for Android Workaround CoreCLR R2R integration test failure on non-Android platforms Mar 2, 2026
@mattleibow mattleibow force-pushed the fix/disable-coreclr-r2r-integration-test branch from 4766ba0 to 06574c9 Compare March 2, 2026 21:56
@mattleibow mattleibow changed the title Workaround CoreCLR R2R integration test failure on non-Android platforms Workaround CoreCLR R2R integration test build failures on macCatalyst and Windows Mar 2, 2026
… and Windows

CoreCLR R2R template builds fail for macCatalyst (R2R object has wrong
linker version) and on Windows for iOS/macCatalyst (crossgen2 missing).
Remove the macCatalyst and Windows TFMs from the generated project when
UseMonoRuntime=false, keeping Android and iOS which build successfully.

This needs to be fixed upstream in the .NET SDK/runtime toolchain.

Workaround for #34303

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattleibow mattleibow force-pushed the fix/disable-coreclr-r2r-integration-test branch from 06574c9 to 5945c77 Compare March 2, 2026 22:03
@StephaneDelcroix
Copy link
Copy Markdown
Contributor

might not be needed with #34237

@mattleibow mattleibow added the do-not-merge Don't merge this PR label Mar 3, 2026
@mattleibow mattleibow marked this pull request as draft March 3, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge Don't merge this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants