Visual Studio adds a circular reference when I drag and drop a user control from the Toolbox

Posted by JoelFan on Stack Overflow See other posts from Stack Overflow or by JoelFan
Published on 2010-06-08T21:18:59Z Indexed on 2010/06/08 21:22 UTC
Read the original article Hit count: 149

Filed under:
|

I have a user control C that is defined inside project P. C is present as a ".NET Framework Component" in my Visual Studio Toolbox. I open a form F (also defined inside project P) and drop C onto F.

Once I do that drop, Visual Studio adds a reference under P pointing to P's own DLL. This is unnecessary and causes tons of build errors like The call is ambiguous between the following methods or properties... after which it lists the exact same method twice. If I go into References and delete the added reference, it builds correctly.

Can I prevent VS from adding this unnecessary reference?

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about usercontrols