-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Description
There were certain APIs related to Microsoft.Extensions.Configuration that were marked as RequiresUnreferencedCode
that at the same time were annotated to preserve at least some of the necessary members when trimming. This made the API partially work when trimming, while still generating trimming warnings. The annotations are now removed completely. Users are encouraged to migrate to the source generator that works reliably with trimming.
Version
.NET 10 Preview 6
Previous behavior
Certain Microsoft.Extensions.Configuration APIs worked with some limited use cases while generating trimming warnings at publish time.
New behavior
Certain Microsoft.Extensions.Configuration APIs worked with even more limited use cases while generating trimming warnings at publish time.
Type of breaking change
- Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
- Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
- Behavioral change: Existing binaries might behave differently at run time.
Reason for change
We're removing uses of DynamicallyAccessedMemberTypes.All from the product.
Recommended action
Use the binding configuration source generator.
Feature area
Extensions
Affected APIs
Overloads that generate trimming warnings.
Metadata
Metadata
Labels
Type
Projects
Status