Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Linker doesn't resolve type references to facades in data flow cases #1542

Closed

Description

@vitek-karas

For example [DynamicDependency(".ctor","System.Xml.Linq.XElement","System.Xml.Linq")] will generate warning (IL2036) because it won't be able to find the type XElement in System.Xml.Linq - the type is actually not declared there, System.Xml.Linq only has a type forward for it.

Similarly when passing in a constant string to a value annotated with DynamicallyAccessedMember - the type resolution also doesn't see through type-forwards.
This also applies to intrinsic handling for things like Type.GetType.

Activity

  1. added this to the .NET 6.0 milestone on Nov 13, 2020
  2. vitek-karas commented on Jun 17, 2021

    @vitek-karas
    MemberAuthor

    This is now fixed. The linker will not only correctly see through facades, but it will also preserve the facade and the type forwarder in it.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions