Add breaking change documentation for DAMT.All replacement in System.Reflection APIs #48922
+242
−0
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.
Summary
This PR adds comprehensive breaking change documentation for .NET 10, documenting the replacement of
DynamicallyAccessedMemberTypes.All
with more restricted annotations in System.Reflection APIs.Issue
Closes #48898
Changes
Documentation Added
Created breaking change documentation describing how
System.Reflection.IReflect.InvokeMember
,System.Type.FindMembers
, andSystem.Reflection.TypeInfo.DeclaredMembers
APIs have been updated to use more restricted annotations instead ofDynamicallyAccessedMemberTypes.All
in .NET 10 Preview 1.Files Created
docs/core/compatibility/reflection/10.0/ireflect-damt-annotations.md
IReflect
or deriving fromTypeInfo
Code Snippets
docs/core/compatibility/reflection/10.0/snippets/ireflect-damt-annotations/csharp/MyType.cs
- C# example showing required annotationsdocs/core/compatibility/reflection/10.0/snippets/ireflect-damt-annotations/vb/MyType.vb
- Visual Basic equivalentFiles Modified
docs/core/compatibility/10.0.md
- Added Reflection section to .NET 10 breaking changes overviewdocs/core/compatibility/toc.yml
- Added new Reflection entry for .NET 10Example
The documentation includes code examples showing how to implement the required annotations when implementing
IReflect
:Documentation Guidelines
ai-usage: ai-generated
)Testing
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.