views:

268

answers:

2

Hi,

I've made a user custom control which uses external (seperate dll) class library. In MSVS's control viewer everything is fine but when I try to use my control in project the functionality which depends on the external dll does not work until I put that dll into references. Is there a way to fix it? I mean I don't want to put each library which is referenced from my control into references of my project.

Thanks for your advices, SOreader

+1  A: 

I'm not quite sure I understand your question. If you're asking whether you have to reference all dependent assemblies when you use a given Control, the answer is yes you do.

Perhaps you can explain why referencing these dependent assemblies is an issue as that might be the root issue here.

If you're asking something else please clarify...

akmad
have a look at the comment I've made to Michael McCloskey
+1  A: 

If your control depends on the class library, then any project that uses your control will also depend on the class library. If you add the control to your toolbox, Visual Studio should detect these dependencies and add the appropriate references to any project to which you add the control.

Michael McCloskey
well, as you said, MSVS should but it does not. I have to add this additional reference by my own. Few details on the project: Class library: Simple property editor (derived from UITypeEditor) Custom control: My control which does some stuff. It uses editor to edit its properties. Control references the library. Project: I add control to the toolbox. I put control on the form, try to edit its properties and.... crap. I can't until I manually add refernce to the editor library to my project. btw. I'm still on the MSVS'05 with SP1 and some other updates
Out of curiousity, is CopyLocal set to true in the control project for the class library reference?
Michael McCloskey
yes, it is but doesn't make any difference wether it is set or not :/