Repository navigation
feat: add support for .NET 11 RC 1 - #5566
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>
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>
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
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>
Removes the samples/global.json debugging notes from CONTRIBUTING.md, which is for humans, and keeps the two generic points as short bullets in AGENTS.md. Also drops PR-specific details from the upgrade table rows. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| - os: macos-26 # Pin macos to get the version of Xcode that we need: https://github.com/actions/runner-images/issues/10703 | ||
| rid: macos # universal (osx-arm64 + osx-x64) | ||
| - os: windows-latest | ||
| - os: windows-2025-vs2026 |
There was a problem hiding this comment.
q: Doesn't latest already include vs2026?
There was a problem hiding this comment.
It didn't for arm - so I just pinned both x64 and arm64 using the vs2026 label for consistency.
The Arm64 label will also move next week - overall those more 'generic' labels on the build runners seem more volatile so probably valuable to pin to more specific labels anyway (hopefully CI breaks less for us that way).
lucas-zimerman
left a comment
There was a problem hiding this comment.
Overall looking good! left an question that doesn't block the PR so LGTM!
* feat: add support for .NET 11 RC 2 Bumps the SDK, workload set and prerelease Microsoft.* package references from RC 1 to RC 2. The RC 2 Apple packs (27.0.12212) only accept platform version 27.0 and require Xcode 27.0, so the iOS and Mac Catalyst TFMs move to 27.0 everywhere the version is spelled out. The macos-26 runner image tops out at Xcode 26.6, so the macOS jobs move to the preview xcode-27 image. XHarness 26117.1's mlaunch can't start the simulator under Xcode 27, which replaced Simulator.app with DeviceHub.app, and reports the failure as APP_CRASH. 26506.3 handles it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(apple): adopt the UIScene lifecycle in the iOS and Mac Catalyst apps Apps built with the Xcode 27 SDKs must use the UIScene lifecycle. Without it Sentry.Samples.Maui sat on the launch screen on an iOS 27 simulator, and the device test and integration test apps would have done the same. The MAUI apps get the manifest and an empty MauiUISceneDelegate subclass, as in the MAUI RC 2 templates. Sentry.Samples.Ios builds its UI in the SceneDelegate it already had. UIKit doesn't call application-level activation callbacks under scenes, so the integration test app's OnActivated hook moves to its SceneDelegate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(maui): report in_foreground for apps using the UIScene lifecycle Sentry.Maui set InForeground from the application-level OnActivated, OnResignActivation and DidEnterBackground events. For apps using the UIScene lifecycle, which Xcode 27 requires, MAUI raises SceneOnActivated and friends instead, so InForeground stayed null and in_foreground disappeared from every iOS and Mac Catalyst event. The iOS integration test now asserts "in_foreground":true; without the Scene* handlers it fails in both Release and Debug. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(apple): upload framework symbols only from the assemblies that ship #5566 collected framework PDBs from both "linked" and "postprocessed-assemblies", assuming only one exists per SDK. .NET 11 RC 2 writes both. The post-processor rewrites some assemblies (Microsoft.MacCatalyst, Microsoft.Maui.Controls and Microsoft.Maui.Essentials in the MAUI sample) and gives them new PDB IDs, and only the postprocessed copies end up in the app bundle. So every PDB was uploaded twice, and the "linked" copies of the rewritten assemblies matched nothing that ships. "linked" is now only the fallback for SDKs without "postprocessed-assemblies". cli.Tests.ps1 compares file names with Sort-Object -Unique, so it couldn't catch this; it now asserts that nothing is collected from "linked". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: upload symbols and create releases when publishing Native AOT with the .NET 11 SDK From RC 2 the .NET 11 SDK publishes Native AOT apps without running Build: UseOptimizedPublish defaults to true when PublishAot is set, and Publish depends on _PublishOptimizedBuildAlternative, which runs only Compile and the publish targets (dotnet/sdk#54515). CheckSentryCLI, which every upload and release target depends on, hooked AfterTargets="Build", so the symbol upload silently stopped. This is decided by the SDK, not the TFM, so net8.0-net10.0 apps published with the .NET 11 SDK are affected too. CheckSentryCLI and the release targets now also run after _PublishOptimizedBuildAlternative. Caught by the native AOT publish cases in cli.Tests.ps1, which failed for both net10.0 and net11.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: extend the .NET upgrade checklist with the RC 2 breakages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: keep only the recurring RC 2 lessons in the upgrade checklist Drops the UIScene row, a one-off Apple requirement. Trims the XHarness row to the part that recurs, and folds the AOT publish and trimmer directory rows into one row about symbol upload depending on SDK internals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Update src/Sentry/buildTransitive/Sentry.targets * fix(maui): keep in_foreground true while another window is active Opening a second window on iPad fires SceneOnResignActivation and SceneDidEnterBackground for the first scene after SceneOnActivated for the second, so InForeground ended up false while the app was in use. Resign and background now leave it true if another connected scene is ForegroundActive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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