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.

Single Linker config for .NET Native and Mono #57

Closed

Description

@clairernovotny

I fully support the idea of a linker in .NET Core but please consolidate the linker directives. There's rd.xml for .NET Native and this new thing. Please pick one and use it for both toolchains. Otherwise we'll need to duplicate linker directives and that's going to lead to errors.

Activity

  1. hrumhurum commented on Dec 14, 2018

    @hrumhurum

    Please strongly consider to consolidate the formats.

    Just hit a project where a set of .NET Standard libraries were both used in Xamarin and UWP hosts. UWP was a breathe thanks to RD.XML and its ability to be embedded right in the library.

    Xamarin experience was considerably worse as I had to specify the same rules, but this time at the central location which is a linker description file. Did not like it at all, especially given the fact that some .NET Standard libraries are authored by another teams and its their responsibility to make them linker friendly, not mine.

    RD.XML file format support in .NET Linker is highly welcome. This would eliminate the sharp edges and unpleasant dichotomy we currently have. Especially given the fact that .NET Linker now targets .NET Core.

  2. vitek-karas commented on Sep 12, 2022

    @vitek-karas
    Member

    The plan is to teach NativeAOT about the linker format - it actually already does some of this, main part of the missing work is tracked here: dotnet/runtime#73083

    Going forward the recommendation for libraries/apps is to not use the XML files but instead use code. So either (in recommendation priority order):

    • direct references
    • use source generators to produce direct references
    • annotated reflection code with DynamicallyAccessedMembersAttribute
    • use DynamicDependencyAttribute (this is basically a code replacement for the descriptor XML file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions