So, (seemingly) out of the blue, my project starts getting compiler warning 1685:
The predefined type \'System.Runtime.CompilerServices.ExtensionAtt
Another easy way to verify: In your code, temporarily use the class somewhere. Example:
System.Runtime.CompilerServices.ExtensionAttribute x = null;
When building, this will generate error:
The type 'System.Runtime.CompilerServices.ExtensionAttribute' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll' and .....
And show you immediately the 2 sources causing the conflict.
Another solution for this issue is to use a global alias for the whole assembly:
Reference -> Properties -> Aliases -> Replace 'global' with something else
FYI: I had the same problem and was able to resolve it by using Resharper's "Optimize References" command, and then removing all unused references. Not completely sure why that worked, but it did.
LINQBridge makes me immediately suspicious. The entire intent of this is to provide extension attribute/methods etc for 2.0 users. If you have 3.5 (System.Core.dll), don't use LINQBridge. If you do need LINQBridge in 3.5 for some obscure reason (and I can't think of one), then you might have to use an extern alias. But I really doubt you need it!
Marc is almost certainly correct. Here's a way to verify
If it pops up anywhere besides System.Core then you know where it's coming from.
Another solution for this issue => Right click project -> Properties -> Build -> Treat warnings as errors -> None