[Infra] Mark libraries as AOT/trim compatible#7441
Merged
martincostello merged 5 commits intoJun 21, 2026
Merged
Conversation
Set IsAotCompatible=true for production libraries targeting net8.0+ so the trim/AOT/single-file analyzers run and the assemblies are marked trimmable. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
martincostello
approved these changes
Jun 21, 2026
martincostello
left a comment
Member
There was a problem hiding this comment.
I thought we'd already done this, but turns out I was thinking of the contrib repo.
Could you add an entry for this to the CHANGELOG files please?
Address PR feedback: document trim/AOT compatibility in each package CHANGELOG and remove the self-descriptive comment in Common.prod.props. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Added an |
Move to the end of the sections.
Make the indentation linter happy.
martincostello
enabled auto-merge
June 21, 2026 19:58
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7441 +/- ##
==========================================
- Coverage 90.01% 89.98% -0.04%
==========================================
Files 277 277
Lines 14631 14631
==========================================
- Hits 13170 13165 -5
- Misses 1461 1466 +5
Flags with carried forward coverage won't be shown. Click here to find out more. |
Contributor
Member
|
Post merge review, shouldn't' also |
4 tasks
This was referenced Jul 18, 2026
Open
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.
This change fixes the IL3058 analyzer's diagnostic for the OpenTelemetry libraries by enabling IsAotCompatible for production libraries targeting net8.0+.
All of the work for this repo to make it Trim/AOT compatible is already done, but this analyzer (which is triggered by the
VerifyReferenceAotCompatibilityproperty being set totrue) checks for metadata that is embedded in the assembly when this particular property is enabled.