Skip to content

Use internal versions of linker dynamic attributes in multi-TFM libraries #40999

Description

@layomia

Recent work to annotate multi-TFM libraries for linker safety has introduced netcoreapp specific #ifdefs in ref assemblies, e.g. in System.Text.Json, in order to use DynamicallyAccessedMembersAttribute and DynamicallyAccessedMemberTypes which are netcoreapp only. From previous discussions on keeping support for netstandard2.0 TFMs, whenever we have a situation that requires adding #ifdefs in the ref, it introduces increased complexity in maintaining support for ns2.0.

Similar to the approach for Nullable and the Microsoft.Extension libraries, the action for 5.0 is to use internal versions of the attributes as a dependency on each applicable library.

cc @eerhardt @joperezr @ericstj
fyi @ahsonkhan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions