strange warning about ExtensionAttribute

后端 未结 6 696
旧时难觅i
旧时难觅i 2020-12-15 16:23

I\'m getting a strange warning:

The predefined type \'System.Runtime.CompilerServices.ExtensionAttribute\' is defined in multiple assemblies in the gl

6条回答
  •  失恋的感觉
    2020-12-15 16:24

    Expanding on ShuggyCoUk's (correct) answer

    Truthfully it doesn't matter which version of the attribute is used (GAC, 3rd part, etc ...). All that matters is the C#/VB compiler can find some attribute with the correct name. The attribute serves no functional purpose in code. It exists purely to tell the Compiler "hey, this is an extension method".

    You can safely ignore this warning.

提交回复
热议问题