1

I made a user control library with one control in it, and added it to a winforms project. It showed up in the toolbox under a tab named after the control library automatically. Then I added 2 controls to the lib, and built it, and when I opened the winforms project, it didn't show up in the toolbox, and I found this question and put it back in the toolbox by right clicking it, and clicking "choose items" and going to the library's bin directory. But it showed up only in the all controls tab. My question is, why did it stop doing it automatically and why does it not have its own tab anymore (previously it had its own tab)?

Community
  • 1
  • 1
Oztaco
  • 3,399
  • 11
  • 45
  • 84

1 Answers1

2

Just a few thoughts I mentally go through and hope resolves your issue.

Yes, I too have a separate "control library" dll, and it has subclassed Textbox, Checkbox, label, etc...

Each of the classes is declared as PUBLIC.
Each class as a zero parameter constructor() as a default, even though implied otherwise.

That said, my "Solution" has the main "Windows Application" project. I then ADD the OTHER (Control Class library PROJECT), if yours is not already, INTO the solution.

Then, in my main project's, I did an Add Reference. This brings up the dialog of the locations to pick from including .Net, COM, Projects, Browse and Recent. I make sure that I reference the "Project" and it should list all projects within your solution. I do NOT just pick the physical .DLL where you may have built the project otherwise.

Then, under the menu, I do "Build" / "CLEAN SOLUTION". This forces all other dependency projects to get their DLL rebuilt and reloaded, THEN the main project of the solution is rebuilt.

After doing so, all the controls SHOULD get refreshed into the toolbar, such as when you bring a main project window up for adding your controls. The toolbar SHOULD auto-load the toolbar controls based on the project dlls associated with your solution...

It might just be one missing step that has you hung...

DRapp
  • 47,638
  • 12
  • 72
  • 142