I have a command line application that uses a specific assembly. The assembly is at the root of the project and is set to Copy Always.
I am adding a link to this assembly, and Visual Studio 2010 is happy - Intellisense displays everything correctly and no errors are reported.
But as soon as I actually build, I get compilation errors, for example, I didn’t add the link, and Intellisense suddenly gives me red squigglies, as if the link had never been added.
But the link still exists.
If I delete the link and then add it again, Visual Studio will be happy again and the red squigglies will disappear. Then I build, and the same thing happens again.
So, Visual Studio agrees that there is a link. While I'm not building. Then he claims not. Even if so.
And this only happens with a specific DLL (NLog, if that matters). Another DLL (HtmlAgilityPack) is working fine, and it is configured and configured in exactly the same way.
Deane source share