Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 22, 2025

This PR adds comprehensive breaking change documentation for the removal of DynamicallyAccessedMembers annotations from trim-unsafe Microsoft.Extensions.Configuration APIs in .NET 10 Preview 6.

Changes Made

New Documentation

  • Created: docs/core/compatibility/extensions/10.0/dynamically-accessed-members-configuration.md
    • Documents the breaking change affecting trimming behavior
    • Follows the official template structure from .github/prompts/breaking-change.md
    • Includes proper metadata with AI usage attribution
    • Categorizes as binary incompatible change introduced in Preview 6

Updated Navigation

  • Updated: docs/core/compatibility/toc.yml
    • Added entry under Extensions > .NET 10 section
  • Updated: docs/core/compatibility/10.0.md
    • Added table row in Extensions section with correct categorization

Breaking Change Summary

The change removes DynamicallyAccessedMembers annotations from Microsoft.Extensions.Configuration APIs that were already marked as RequiresUnreferencedCode. This affects trimming behavior by reducing the amount of code preserved during trimming, making these APIs work with even more limited use cases while still generating trimming warnings.

Impact: Binary incompatible
Recommended Action: Migrate to the binding configuration source generator
Affected: APIs that generate trimming warnings in Microsoft.Extensions.Configuration

The documentation provides clear guidance for developers on understanding the impact and migration path to trim-safe alternatives.

Fixes #47433.


💡 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.


Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/10.0.md Breaking changes in .NET 10
docs/core/compatibility/extensions/10.0/dynamically-accessed-members-configuration.md DynamicallyAccessedMembers annotation removed from trim-unsafe configuration APIs
docs/core/compatibility/toc.yml docs/core/compatibility/toc

Copilot AI changed the title [WIP] [Breaking change]: Removed DynamicallyAccessedMembers annotation from trim-unsafe Microsoft.Extensions.Configuration code Add breaking change documentation for DynamicallyAccessedMembers annotation removal in .NET 10 Jul 22, 2025
Copilot AI requested a review from gewarren July 22, 2025 21:03
Copilot finished work on behalf of gewarren July 22, 2025 21:03
@gewarren
Copy link
Contributor

Please use xref links instead of backticks for API names.

Copy link
Contributor Author

Copilot AI commented Jul 22, 2025

Please use xref links instead of backticks for API names.

Updated API references to use xref links instead of backticks:

  • RequiresUnreferencedCode<xref:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute>
  • DynamicallyAccessedMembers<xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute>
  • DynamicallyAccessedMemberTypes.All<xref:System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.All>

Fixed in commit 42b1a53.

Copilot finished work on behalf of gewarren July 22, 2025 21:11
@gewarren gewarren marked this pull request as ready for review July 22, 2025 21:51
@gewarren gewarren requested a review from a team as a code owner July 22, 2025 21:51
@gewarren gewarren requested review from a team and MichalStrehovsky July 22, 2025 22:12
@gewarren gewarren merged commit 7b81acb into main Jul 24, 2025
10 checks passed
@gewarren gewarren deleted the copilot/fix-47433 branch July 24, 2025 15:14
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.

[Breaking change]: Removed DynamicallyAccessedMembers annotation from trim-unsafe Microsoft.Extensions.Configuration code

3 participants