Why is Visual Studio 2010 ignoring my link right after build?

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.

+4
source share
1 answer

With a little search, I found a problem with the .NET client profile . Try looking at this link and see if it solves the problem.

There are also messages about it on the microsoft connect website if you are interested in reading further.

+3
source

Source: https://habr.com/ru/post/1332229/


All Articles