Why is Visual Studio 2010 continuing to add a “self reference” to my class library?

Sometimes VS does not allow me to edit and continue, and it turns out because my Eric.Controls project has a link to Eric.Controls . This is a link to a project that I have never added. The steps for playback are incompatible, but as a rule, I think this happens when I use the constructor and add a control from another project that I am referencing.

This sometimes also leads to the fact that I cannot compile at all until I restart Visual Studio, whose target executable is locked.

First, why does VS even allow the project to refer to itself?

Any ideas?

I am happy to answer any questions that may lead to an answer.

+7
source share
3 answers

Found an answer!

If you use folders with solutions, and you have a project containing a control in the solution folder, when you drag a control from the toolbar, it adds a link to this library.

Solution: Do not put management libraries in solution folders.

+4
source
Yes, I noticed that too. This is a visual studio error: http://connect.microsoft.com/VisualStudio/feedback/details/613502/automatically-add-self-reference

This happens when you drag something into the constructor from the toolbar. To get around this, simply delete the link to yourself.

+6
source

I had the same problem. In my case, the designer is to blame. The designer sometimes added links to my projects. Especially when using DataBinding and Forms.

PS: Links to files displayed by the namespace and links to the project are displayed by the name of the project in the folder with links.

0
source

All Articles