Repository navigation
Drop Mono support for mobile targets at .NET 11 GA #5553
Description
Background
.NET 11 makes CoreCLR the default runtime for Android, iOS and MacCatalyst. Mono is not removed in the pre-releases: <UseMonoRuntime>true</UseMonoRuntime> is documented as an opt-back in .NET MAUI moves to CoreCLR in .NET 11.
Our reading is that this escape hatch exists for the .NET 11 pre-release period, and that dropping Mono for mobile is still planned for .NET 11 GA. Raised by @dartasen in #5529 (comment) and discussed in #5529 (comment).
So #5529 keeps Mono coverage for the pre-releases. This issue is the reminder to remove it at GA.
Tip
Mono is not going to be officially supported in 11:
https://devblogs.microsoft.com/dotnet/coreclr-progress-and-mono-timeline-dotnet-maui/
Current state on the preview 7 SDK
UseMonoRuntime=true alone fails on mobile TFMs:
error NETSDK1242: Building Android projects with the Mono runtime is not supported in .NET 11.0
and later. Use the CoreCLR runtime or target .NET 10.0.
The SDK's own _DisableCheckForUnsupportedMonoMobileRuntime=true turns that check off, and the Mono runtime packs still ship, so the result is a genuine Mono build — verified on the device test app:
net11.0-android37.0→libmonosgen-2.0.so,libmonodroid.so, nolibcoreclr.sonet11.0-ios26.5→libmonosgen-2.0.dylibandlibxamarin-dotnet.dylib(not the-coreclrvariant), nolibcoreclr.dylib
The gating target is _CheckForUnsupportedMonoMobileRuntime in Microsoft.NET.TargetFrameworkInference.targets, covering android, ios, tvos and maccatalyst for TFM >= 11.0.
What to do at .NET 11 GA
Confirm Mono is actually gone for mobile, then:
-
integration-test/android.Tests.ps1— drop themonocases and the_DisableCheckForUnsupportedMonoMobileRuntimeinjection -
integration-test/ios.Tests.ps1— same -
test/Sentry.Android.AssemblyReader.Tests/Sentry.Android.AssemblyReader.Tests.csproj— the Mono AOT APK variants (_TestAPK5-8) are alreadynet10.0-androidonly; drop them entirely if Mono is gone, rather than widening them -
test/Sentry.Android.AssemblyReader.Tests/AndroidAssemblyReaderTests.cs— theNET11_0_OR_GREATERAOT skip - Update
CONTRIBUTING.mdif the mobile runtime story is worth recording for next year's upgrade
If instead Mono survives into .NET 11 GA and only the _Disable... property goes away, the fix is smaller: delete that property from the two integration test scripts and keep the Mono cases.
Related
- Port upstream AssemblyStore reader changes: v4/CoreCLR format, _assembly_store symbol, index-entry sizing (next major) #5454 — Android assembly store v4. Note v4 is a .NET 11 Android workload change, not a CoreCLR one: a Mono net11 APK reports store version
0x80010004(64-bit | aarch64 | v4), the same version as the CoreCLR build. Opting back to Mono is therefore not a symbolication workaround.
Activity
linear-code commentedon Sep 9, 2026
NET-807
Frame the Mono opt-back as pre-release only, link #5553
[-]Drop Mono support for mobile targets at .NET 11 GA[/-][+][Maybe???] Drop Mono support for mobile targets at .NET 11 GA[/+][-][Maybe???] Drop Mono support for mobile targets at .NET 11 GA[/-][+]Drop Mono support for mobile targets at .NET 11 GA[/+]jamescrosswell commentedon Sep 10, 2026
Closing: this was filed on the reading that
UseMonoRuntimewas a supported opt-back for the .NET 11 pre-releases, with Mono dropping at GA. Microsoft have since confirmed that isn't the case — Mono is not officially supported on .NET 11 for mobile at all, so there is no pre-release Mono coverage to remove later.The follow-up post is explicit:
and the build property to select Mono "has been removed entirely" — https://devblogs.microsoft.com/dotnet/coreclr-progress-and-mono-timeline-dotnet-maui/
#5529 therefore tests Mono only where it is supported (net10.0 and below) and CoreCLR only on net11.0, which is the state it was already in before this issue was filed. Nothing left to do at GA.
One correction worth carrying forward, since it was found while investigating this: Android assembly store v4 is not a CoreCLR artifact. A Mono net11 APK reports store version
0x80010004(64-bit | aarch64 | v4) — the same version a CoreCLR build reports, the differing nibble being the ABI. v4 is a .NET 11 Android workload change, independent of runtime, so runtime choice is not a workaround for #5454.