Skip to content

feat: add support for .NET 11 RC 1 - #5566

Open
jamescrosswell wants to merge 12 commits into
version7from
net11-rc1
Open

jamescrosswell wants to merge 12 commits into
version7from
net11-rc1

Conversation

@jamescrosswell

@jamescrosswell jamescrosswell commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Follows #5529 (preview 7) through to RC 1, targeting version7.

Closes #5552

The version bump

preview 7 RC 1
SDK (global.json) 11.0.100-preview.7.26381.103 11.0.100-rc.1.26425.128
workload set (global.json) 11.0.100-preview.7.26410.2 11.0.100-rc.1.26458.5
prerelease Microsoft.* package refs 11.0.0-preview.7.26381.103 11.0.0-rc.1.26425.128

RC 1 moved no TFMs — macios dotnet-11.0.1xx-rc1-12193 still publishes net11.0-ios26.5/net11.0-maccatalyst26.5 and android 37.0.0-rc.1.2257 is still API 37.0 — so Directory.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.0 and 10.0.x in dotnet-version were all already in place from #5529.

The runtime-deps container pins stay on the 11.0-preview-* tags. MCR now also publishes non-preview 11.0-resolute-chiseled/11.0-alpine, but runtime-deps carries OS-level dependencies rather than the runtime, so the distro is what matters and the preview tags still resolve correctly. Per the CONTRIBUTING.md checklist 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.json back to preview 7, rebuild the single project and TFM that failed, compare. That technique is now written into CONTRIBUTING.md, along with rows for all four.

1. CS0400 in the Android bindings — blocked every job. The android 37 generator keeps methods whose parameter types are unbound, where android 36 dropped them before the Metadata.xml transforms ran (the overload is in api.xml.class-parse but not api.xml). TombstoneParser.parse(Tombstone) takes a type from epitaph, which we reference with Bind="false", so the generated binding emitted an unresolvable global::Com.Abovevacant.Epitaph.Core.Tombstone. Dropped the overload; we never call TombstoneParser from C# and the parameterless parse() is unaffected.

Scoped to net11+ in its own transform file, because the Android SDK auto-globs Transforms/**/*.xml into every TFM and the entry warns BG8A00: matched no nodes on android 36 - which reads exactly like a broken XPath to whoever hits it next.

2. CsWinRT1032 on both -windows TFMs. 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.extraData is params IEnumerable<(string key, string value)>, so four gesture breadcrumbs tripped it. Cast to a concrete array rather than changing the public signature. Note this hits net10.0-windows too - 8 errors under RC 1, 0 under preview 7, same source.

3. IL2037 ×154 when linking an Apple app. MAUI 11 RC 1's own Compatibility handler descriptors name members that don't resolve. ILLinkTreatWarningsAsErrors defaults to TreatWarningsAsErrors, so these failed the build. Demoted via WarningsNotAsErrors rather than silenced with NoWarn, so it stays visible and gets removed once MAUI fixes the descriptors. We ship no ILLink descriptors of our own, so every IL2037 is external by construction; Sentry.TrimTest and Sentry.MauiTrimTest opt out of Directory.Build.props, so the Trim analysis job keeps the strict setting.

4. Apple symbol upload silently stopped uploading framework symbols — this one affects customers.

Sentry.targets collected the framework assemblies' PDBs (Microsoft.iOS, Microsoft.Maui.*) from $(IntermediateOutputPath)linked. RC 1 renamed that directory to postprocessed-assemblies. The glob is Exists()-guarded, so nothing errored - six fewer debug files were uploaded and framework frames stopped symbolicating.

linked/ postprocessed-assemblies/
preview 7 11 PDBs absent
RC 1 absent the identical 11 PDBs

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 _CopyAotSymbols change in #5529.

Worth flagging in review: it was caught only because integration-test/cli.Tests.ps1 asserts the exact upload set. Both probes remain Exists()-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.MauiTrimTest targets only net10.0-android36.0;net10.0-ios26, so MAUI trim analysis doesn't cover net11.0 at 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-ios26 can't be built on a machine set up for this branch: it pins Xcode 26.0 while RC 1's net11.0-ios26.5 requires the 26.6 that CI pins. CI has that publish commented out already (provisioning profiles), so nothing is lost.

🤖 Generated with Claude Code

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

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (version7@21f45f0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...Maui/Internal/MauiGestureRecognizerEventsBinder.cs 0.00% 5 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jamescrosswell and others added 4 commits September 10, 2026 17:14
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>
jamescrosswell and others added 4 commits September 14, 2026 16:26
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>
Comment thread .github/workflows/build.yml Outdated
@jamescrosswell

Copy link
Copy Markdown
Collaborator Author

Why build-sentry-native.ps1 passes -T v143

Drop -T v143 once VS 2022 is out of support, or if the v143 component disappears from the runner images.

…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>
Comment thread .github/workflows/build.yml Outdated
Comment thread src/Sentry.Maui/Internal/MauiGestureRecognizerEventsBinder.cs Outdated
Comment thread src/Sentry/buildTransitive/Sentry.targets Outdated
Comment thread Directory.Build.props Outdated
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
@jamescrosswell
jamescrosswell marked this pull request as ready for review September 15, 2026 03:14
@github-actions github-actions Bot added the risk: high PR risk score: high label Sep 15, 2026
Comment thread src/Sentry.Maui/Internal/MauiGestureRecognizerEventsBinder.cs
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant