I'm currently working on an assembly that has both forms and controls
in it.
When I create a new control based on UserControl and compile, it shows
up in the toolbox for all forms in this assembly.
When I create a subclassed control (from label in this case), it does
not show up in the toolbox.
I understand you can add it through Add/Remove Items... but then I'm
adding a reference to itself and I get all kinds multiple declaration
errors. I also understand that you can remove the reference after
you're done designing and it all works. This, however, is a pain
because the reference gets added everytime you add the control to a
form. I could deal with this but this control needs to be distributed
within the company to 30 - 50 other developers.
How do I see subclassed controls in the toolbox for the current
assembly without adding a reference to itself?
Addition: Even when you remove the reference, the assembly stays
in memory once the designer has been opened. I have to shut down VS and
open again to do a full compile.
Thanks,
Corey.
jokiz - 20 Feb 2006 04:32 GMT
this is a very common scenario and i suggest you separate the control
assembly from your windows forms UI project. it will also help you
debug your controls easily. As you've said, you want the control
package to be distributed in the company, so it should really be in a
separate assembly.