Skip to content

Add warning about DAM and add info about DAM on type for IL2075 #42306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

jtschuster
Copy link
Member

@jtschuster jtschuster commented Aug 22, 2024

Summary

Add note about using the least DynamicallyAccessedMemberTypes for DynamicallyAccessedMembersAnnotations.

Add example of Object.GetType causing IL2075 and explain how to solve by adding DAM on the type definition.


Internal previews

📄 File 🔗 Preview link
docs/core/deploying/trimming/fixing-warnings.md docs/core/deploying/trimming/fixing-warnings
docs/core/deploying/trimming/trim-warnings/il2075.md docs/core/deploying/trimming/trim-warnings/il2075

@jtschuster jtschuster requested a review from a team August 22, 2024 22:48
@jtschuster jtschuster requested review from adegeo and a team as code owners August 22, 2024 22:48
@dotnet-bot dotnet-bot added this to the August 2024 milestone Aug 22, 2024
Copy link
Member

@sbomer sbomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Co-authored-by: Sven Boemer <sbomer@gmail.com>
@jtschuster jtschuster merged commit 3a5c16b into dotnet:main Aug 23, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants