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 sol
Check project path, avoid & , # etc.
I've moved my solution from drive:\work\c#\folder\
to drive:\work\folder
and it solved the problem.
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
I was trying to build a x64 only application, so my platform target was set to x64
of course.
However, even in 2016, Visual Studio (devenv.exe
) is still a 32 bit process and it cannot load 64 bit assemblies. To check the bitness of your Visual Studio, open Task Manager and check for *32
at the name of the process.
Workaround to see the Controls in the toolbox: set the platform target to Any CPU
in the project settings. Do that for Debug and Release build, if necessary.
Another reason that user controls may not show up in the toolbox is if they do not have a default constructor.
It is possible for all of the above to fail.
I fixed it by creating a new user control (TestControl) and it triggered Visual Studio to magically add my project's controls tab + controls back into the Toolbox. Then I just deleted the test control.
This happened to me after recently installing a VS 2008 automated windows update, by the way.
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 sure Register for COM interop
is checked.