I have some UserControls that I created in ProjectA. I have ProjectB that has a windows form that I want to put the controls on. Both of these projects are in a single solution. There's a reference to ProjectA from ProjectB so it can "see" the UserControls.
However, the UserControls do not show up in the toolbox for me to drag to the windows form.
I've tried rebuilding. I've also deleted the 'bin' directory to force a rebuild-all.
How do I get VS2008 to populate the toolbox with my UserControls?
I fell into this trap just a couple of hours ago.
I've got a .NET 2.0 Windows Application project with some custom UserControls; it worked fine. So I decided to order my files in subfolders, to make my project a little bit cleaner.
After that, Visual Studio 2010 designer stopped loading my forms, and ToolBox won't show my controls anymore.
I freaked out, moving back source files in project root, resetting ToolBox, but nothing seemed to work. After that, I remembered I used ReSharper "Remove Unused References", so I tried to put back unused reference, in particular System.Data: problem solved! :O I can't say you why, but this worked for me.
Hope my experience can help someone else. :)
Bye, Nando
In your UserControl, make sure that New is declared Public. It won't show up if it's just declared Sub New (which defaults to Friend).
Also double check that your user controls have a valid Namespace.
I just found that controls without namespace are not placed inside the ToolBox.
In my case the reason of error was an excess length of a path to my control's .dll. I had shrunk it a bit and everything became working fine.
Also I found out that the special symbols (e.g. I used #) in a path affect a control display.
Hope it solves the issue.
I had the same problem. After a lot of googling I did not find anything, but by chance I found out that if you click on the toolbox while you are in the same project that you have created the user control in, and check "show all", then a group with the same name as your project will appear at the top of toolbox which you can find your user control in. Now you can add your control on your desired form!
If you've tried following all the other answers and it still doesn't work, the following fixed it for me:
Properties
.Build
settings category, make sureRegister for COM interop
is checked.