Repository navigation
Add Native AOT compatibility coverage for core libraries - #7659
Merged
Nigusu-Allehu merged 3 commits intoSep 8, 2026
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
eerhardt
force-pushed
the
dev-eerhardt-suppress-aot-warnings
branch
from
August 27, 2026 20:19
4e29387 to
86a33bd
Compare
Nigusu-Allehu
self-requested a review
September 1, 2026 23:13
Nigusu-Allehu
previously approved these changes
Sep 2, 2026
Co-authored-by: Copilot App <[email protected]>
Nigusu-Allehu
previously approved these changes
Sep 3, 2026
donnie-msft
previously approved these changes
Sep 4, 2026
kartheekp-ms
reviewed
Sep 4, 2026
Co-authored-by: Copilot App <[email protected]>
eerhardt
dismissed stale reviews from donnie-msft and Nigusu-Allehu
via
September 4, 2026 22:03
1a251f3
Nigusu-Allehu
approved these changes
Sep 8, 2026
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.
Bug
Fixes:
Description
Add a Native AOT compatibility test app that roots a subset of NuGet's core libraries, publishes them with AOT analysis enabled, and runs the resulting executable in PR validation. This establishes a warning-free baseline that prevents AOT regressions while additional libraries are made compatible and added incrementally over time.
The test enables the existing System.Text.Json feature switch and uses the AOT annotations available in Newtonsoft.Json 13.0.4. Known warnings originating within Newtonsoft.Json and its dynamic runtime dependencies are reduced to assembly-level warnings and suppressed so diagnostics in NuGet-owned code remain actionable.
Replace source-only
IL2026andIL3050pragmas with durable annotations where appropriate. Calls known to be safe useUnconditionalSuppressMessage; legacy Newtonsoft.Json paths useRequiresUnreferencedCodeandRequiresDynamicCode, with narrowly scoped suppressions at feature-gated call sites that Native AOT removes.PR Checklist