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
Apart all instructions that have been given(Tools > Options > Windows Forms Designer > General : AutoToolboxPopulate) + you need to build the solution (which is obvious for me) you will probably have to pay attention to the class access modifier: it MUST be PUBLIC. I just created a control and did not appeared in toolbox list and I did not knew why. So after set
public class yourClass:control {}
than it appeared in list. ;) Hope this will help others.
Providing you already tried tinkering with:
Yet you still see it greyed out..
Check your path length and check the charcters being used in your absolute path.
I had a project residing in "C:\Users\myName\myCompany\R&D\Projects"
And after few hours found out that the "R&D" is the problem..
The '&' did not allow my usercontrol items to be enabled in my toolbox.
Here was my problem: I had added a new constructor for my control which accepted a few arguments, but I had not explicitly re-declared the empty constructor! The toolbox can only include controls which have empty constructors. In general, when you are designing a class in vb, it has an empty constructor defined implicitly (meaning you don't need to declare one). BUT, as soon as you start designing your own constructors, this empty constructor disappears, so you need to explicitly redefine it in your code! Anyways, I realize most experienced vb coder's already know all this, but hopefully this can help some newbies like myself :).
Check your build output directory. If for some reason you are building your output somewhere other than the project bin\ directory, your controls won't show up in your toolbox.
Up until now, I had no problem with usercontrols not showing in the toolbox. Build the project and it just shows up. Then today not working. After a search I went through following but still no joy.
So after a few hours of messing around trying to get it to work with no success, I created a new WPF windows project accepting the default name and added a usercontrol. Built the project and the user control appeared as it always had.
I then thought that something might be wrong with my project or wpf window file. Removed the project, created a new one and added a new control. Built the project but it didnt work.
The only thing I did different was choose a name for the project, which I included a space in the name "WPF Application".
Removed the project again and created a new one again called "WPFApplication" without the space and added a user control. Built it and the user control showed up.
If you want usercontrols to show up automatically in the toolbox on build, dont use spaces in the project name. Hopefully this post save's someone else a ton of wasted time.