简体   繁体   English

取决于其他几个dll的自定义控件的问题

[英]Problem with custom control that depends on several other dlls

I have created a custom button (you know, with all that eye-candy stuff etc). 我创建了一个自定义按钮(您知道,还有所有那些令人眼花dy乱的东西等)。 That control is based on several other dlls because i want to make set of controls that have the same base (i had already created progressbar, label and button). 该控件基于其他几个dll,因为我要创建一组具有相同基础的控件(我已经创建了progressbar,label和button)。

But there's a problem - when i import reference to my button to some other project (so i can use my button as a regular button) i have to manually import all those dlls my button depends on! 但是有一个问题-当我将对按钮的引用导入到其他项目时(以便可以将按钮用作常规按钮),我必须手动导入按钮所依赖的所有dll! Is there a way to automatically import all needed dlls (references) whenever i import my button? 每当我导入按钮时,是否可以自动导入所有需要的dll(引用)? You know - when i drag my control from toolbox on to form, I want that C# automatically loads ALL dlls that added control depends on. 您知道-当我将控件从工具箱拖到窗体上时,我希望C#自动加载添加控件所依赖的所有dll。 Is there a way to do it? 有办法吗?

Right click the reference -> Properties -> set Copy Local = True 右键单击引用->属性->设置Copy Local = True

If even with this, the dlls is not being copied, them you're probably referencing them in the GAC. 即使这样,dll也没有被复制,您可能在GAC中引用了它们。 You'll have to remove those GAC references... 您必须删除那些GAC参考...

See http://msdn.microsoft.com/en-us/library/wkze6zky(v=vs.80).aspx 参见http://msdn.microsoft.com/zh-cn/library/wkze6zky(v=vs.80).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM