How does the C# compiler decide to emit retargetable assembly references?

前端 未结 3 1250
悲哀的现实
悲哀的现实 2021-02-19 18:04

Retargetable assembly references have been introduced for the .NET Compact Framework and are now used to support Portable Class Libraries.

Basically, the compiler emits

3条回答
  •  醉酒成梦
    2021-02-19 18:51

    For the assembly itself, it's an assembly flag, ie [assembly: AssemblyFlags(AssemblyNameFlags.Retargetable)].

    Make note that this flag is meaningless outside of platform assemblies - custom assemblies cannot be retargetable.

    For references, it's copied as part of the name from the assembly being referenced.

提交回复
热议问题