Andrew Aitken


I've noticed a warning in Visual Studio in a few projects where it gives me the following warning after building,

The predefined type "System.Runtime.CompilerServices.ExtensionAttribute" is defined in multiple assemblies in the global alias

I don't like leaving warnings in my build but I didn't have time to look into it until today. This handy tip from Remco te Wierik led me to the root of the issue. The .net Lucene contrib nuget package contains a reference Lucene.Net.FastVectorHighlighter which defines an ExtensionAttribute class in the System.Runtime.CompilerServices namespace.

Updating the assembly reference alias from "global" to a custom one, fixed the warning.

Page 1 / 1