feat: add support for .NET 11 RC 1 - #5566
Open
jamescrosswell wants to merge 12 commits into
Open
jamescrosswell wants to merge 12 commits into
jamescrosswell wants to merge 12 commits into
Conversation
Bumps the SDK, workload set and prerelease Microsoft.* package references from preview 7 to RC 1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## version7 #5566 +/- ##
===========================================
Coverage ? 74.67%
===========================================
Files ? 515
Lines ? 18892
Branches ? 3684
===========================================
Hits ? 14107
Misses ? 3903
Partials ? 882 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The android 37 (RC 1) binding generator keeps methods whose parameter types are unbound, where android 36 dropped them before the Metadata.xml transforms ran. epitaph is referenced with Bind="false", so the generated binding emitted an unresolvable global::Com.Abovevacant.Epitaph.Core.Tombstone (CS0400), failing every job that builds the Android bindings. Scoped to net11.0+ via an explicit TransformFile Remove, because the Android SDK auto-globs Transforms/**/*.xml into every TFM and the entry would warn BG8A00 on android 36, where the node no longer exists by transform time. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…te array The RC 1 SDK ships a CsWinRT that rejects a collection expression whose target is a non-mutable interface type (CsWinRT1032), because the type the compiler synthesises isn't trim/AOT-safe for WinRT. BreadcrumbEvent's extraData is params IEnumerable<(string key, string value)>, so the four gesture breadcrumbs tripped it on both -windows TFMs. Verified by building src/Sentry.Maui for net10.0-windows under each SDK: 8 errors under RC 1, 0 under preview 7. Casting to a concrete array clears it without touching the public BreadcrumbEvent signature. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MAUI 11 RC 1 emits 154 IL2037s from its own Compatibility handler descriptors when linking an Apple app, and ILLinkTreatWarningsAsErrors defaults to TreatWarningsAsErrors, so those failed the build. Verified as an RC 1 regression by rebuilding Sentry.Samples.Maui for net11.0-maccatalyst under each SDK: 154 under RC 1, 0 under preview 7. Demoted rather than silenced so it stays visible and gets removed when MAUI fixes the descriptors. We ship no ILLink descriptors of our own, so every IL2037 is external; Sentry.TrimTest and Sentry.MauiTrimTest opt out of Directory.Build.props, so the "Trim analysis" job keeps the strict setting. Also extends the CONTRIBUTING upgrade checklist, as that section asks: rows for the three failures this bump hit (CS0400, CsWinRT1032, IL2037), the two traps that make a local samples build misleading, and the global.json swap that distinguishes a toolchain regression from local noise. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sentry.targets collected the framework assemblies' PDBs (Microsoft.iOS, Microsoft.Maui.*) from $(IntermediateOutputPath)linked. .NET 11 RC 1 renamed that directory to postprocessed-assemblies, and because the glob is Exists()-guarded it started failing silently - no error, just six fewer debug files uploaded and no symbolication for framework frames. This ships in buildTransitive, so it affects any customer building a .NET 11 Apple app with Sentry, not just this repo. Same class of bug as the Native AOT _CopyAotSymbols breakage in #5529. Verified on the same project, TFM and RID under each SDK: preview 7 produces linked/ with 11 PDBs and no postprocessed-assemblies; RC 1 produces postprocessed-assemblies with the identical 11 and no linked/. The two names are mutually exclusive per SDK, so probing both double-counts nothing. Caught by integration-test/cli.Tests.ps1, which asserts the exact upload set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Native AOT integration test failed on win-arm64 with LNK1322 (Cortex-A53 erratum 843419). dotnet/runtime#133835 identified it as VS 2022's linker: .NET 10+ requires Visual Studio 2026, whose linker no longer applies that check. windows-11-arm only has VS 2022 (MSVC 14.44); windows-11-vs2026-arm has VS 2026 (MSVC 14.51). Verified in a standalone repro: the same failing build links on windows-11-vs2026-arm and still fails on windows-11-arm (jamescrosswell/dotnet-nativeaot-lnk1322-repro, run 34805799061). build-sentry-native stays on windows-11-arm on purpose. The sentry-native.lib it compiles ships in the package, and MSVC libraries can only be linked by a toolset at least as new as the one that built them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
#5504 (logs always enabled) landed on version7 after this branch was cut and updated the logging snapshots for net8.0, net9.0 and net10.0 but not net11.0, which failed the Linux jobs once this PR was tested merged with version7. Regenerated locally for net11.0. Each diff is the same added lines #5504 made to the DotNet10_0 snapshot: the [Obsolete] on EnableLogs in the Sentry and Sentry.NLog API approvals, and the extra envelope item in WebIntegrationTests.Versioning. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jamescrosswell
commented
Sep 14, 2026
Collaborator
Author
Why
|
…2022 toolset GitHub is moving hosted Windows runners to Visual Studio 2026: windows-latest already runs the VS 2026 image and windows-11-arm follows between September 21 and 30 (actions/runner-images#14602). Use the explicit VS 2026 labels for every Windows job rather than relying on those labels changing underneath us. The shipped sentry-native.lib is the exception: VS 2022 can't link a library built with VS 2026's MSVC, and VS 2022 is still supported for .NET 8 and 9. The VS 2026 images still install the VS 2022 toolset (MSVC 14.44), so build-sentry-native.ps1 selects it with -T v143. The reasoning is in #5566 (comment). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jamescrosswell
commented
Sep 15, 2026
jamescrosswell
commented
Sep 15, 2026
jamescrosswell
commented
Sep 15, 2026
jamescrosswell
commented
Sep 15, 2026
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
jamescrosswell
marked this pull request as ready for review
September 15, 2026 03:14
The comment edit in 8ba1bc7 replaced the cast instead of preceding it, so OnPanGesture's collection expression failed CsWinRT1032 on the -windows TFMs. Also shortens the remaining binding-transform comments. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #5529 (preview 7) through to RC 1, targeting
version7.Closes #5552
The version bump
global.json)11.0.100-preview.7.26381.10311.0.100-rc.1.26425.128global.json)11.0.100-preview.7.26410.211.0.100-rc.1.26458.5Microsoft.*package refs11.0.0-preview.7.26381.10311.0.0-rc.1.26425.128RC 1 moved no TFMs — macios
dotnet-11.0.1xx-rc1-12193still publishesnet11.0-ios26.5/net11.0-maccatalyst26.5and android37.0.0-rc.1.2257is still API 37.0 — soDirectory.Build.props' TFM block, every project and sample that derives from it, and all the Verify snapshots are untouched. Xcode 26.6 (which RC 1 requires),platforms;android-37.0and10.0.xindotnet-versionwere all already in place from #5529.The
runtime-depscontainer pins stay on the11.0-preview-*tags. MCR now also publishes non-preview11.0-resolute-chiseled/11.0-alpine, butruntime-depscarries OS-level dependencies rather than the runtime, so the distro is what matters and the preview tags still resolve correctly. Per theCONTRIBUTING.mdchecklist these get blanked at GA, not at RC.The interesting part: four things RC 1 broke
Each was isolated the same way rather than guessed at - swap
global.jsonback to preview 7, rebuild the single project and TFM that failed, compare. That technique is now written intoCONTRIBUTING.md, along with rows for all four.1.
CS0400in the Android bindings — blocked every job. The android 37 generator keeps methods whose parameter types are unbound, where android 36 dropped them before theMetadata.xmltransforms ran (the overload is inapi.xml.class-parsebut notapi.xml).TombstoneParser.parse(Tombstone)takes a type from epitaph, which we reference withBind="false", so the generated binding emitted an unresolvableglobal::Com.Abovevacant.Epitaph.Core.Tombstone. Dropped the overload; we never callTombstoneParserfrom C# and the parameterlessparse()is unaffected.Scoped to net11+ in its own transform file, because the Android SDK auto-globs
Transforms/**/*.xmlinto every TFM and the entry warnsBG8A00: matched no nodeson android 36 - which reads exactly like a broken XPath to whoever hits it next.2.
CsWinRT1032on both-windowsTFMs. RC 1 ships a CsWinRT that rejects a collection expression whose target is a non-mutable interface, because the synthesised type isn't trim/AOT-safe for WinRT.BreadcrumbEvent.extraDataisparams IEnumerable<(string key, string value)>, so four gesture breadcrumbs tripped it. Cast to a concrete array rather than changing the public signature. Note this hitsnet10.0-windowstoo - 8 errors under RC 1, 0 under preview 7, same source.3.
IL2037×154 when linking an Apple app. MAUI 11 RC 1's ownCompatibilityhandler descriptors name members that don't resolve.ILLinkTreatWarningsAsErrorsdefaults toTreatWarningsAsErrors, so these failed the build. Demoted viaWarningsNotAsErrorsrather than silenced withNoWarn, so it stays visible and gets removed once MAUI fixes the descriptors. We ship no ILLink descriptors of our own, so everyIL2037is external by construction;Sentry.TrimTestandSentry.MauiTrimTestopt out ofDirectory.Build.props, so theTrim analysisjob keeps the strict setting.4. Apple symbol upload silently stopped uploading framework symbols — this one affects customers.
Sentry.targetscollected the framework assemblies' PDBs (Microsoft.iOS,Microsoft.Maui.*) from$(IntermediateOutputPath)linked. RC 1 renamed that directory topostprocessed-assemblies. The glob isExists()-guarded, so nothing errored - six fewer debug files were uploaded and framework frames stopped symbolicating.linked/postprocessed-assemblies/The names are mutually exclusive per SDK, so probing both covers every supported iOS SDK and double-counts nothing. This ships in
buildTransitive, so it would have hit any customer building a .NET 11 Apple app with Sentry, not just this repo - the same class of silent breakage as the Native AOT_CopyAotSymbolschange in #5529.Worth flagging in review: it was caught only because
integration-test/cli.Tests.ps1asserts the exact upload set. Both probes remainExists()-guarded, so the next rename will also fail silently in production and show up only as that test failing. I've said so in a comment above the probes; please don't loosen that assertion to a count.Known gap, unchanged from #5529
Sentry.MauiTrimTesttargets onlynet10.0-android36.0;net10.0-ios26, so MAUI trim analysis doesn't covernet11.0at all - which is a shame given #3 above was a MAUI trimming regression. Left alone here since widening it is a scope decision rather than part of an RC bump, but it may be worth a follow-up.Separately,
dotnet publish test/Sentry.MauiTrimTest -f net10.0-ios26can't be built on a machine set up for this branch: it pins Xcode 26.0 while RC 1'snet11.0-ios26.5requires the 26.6 that CI pins. CI has that publish commented out already (provisioning profiles), so nothing is lost.🤖 Generated with Claude Code