依赖于其他几个 dll 的自定义控件存在问题
我创建了一个自定义按钮(你知道,带有所有漂亮的东西等)。该控件基于其他几个 dll,因为我想制作一组具有相同基础的控件(我已经创建了进度条、标签和按钮)。
但有一个问题 - 当我将对我的按钮的引用导入到其他项目时(这样我就可以将我的按钮用作常规按钮),我必须手动导入我的按钮所依赖的所有这些 dll!有没有办法在导入按钮时自动导入所有需要的 dll(引用)? 你知道 - 当我将控件从工具箱拖到窗体上时,我希望 C# 自动加载添加的控件所依赖的所有 dll。有办法做到吗?
I have created a custom button (you know, with all that eye-candy stuff etc). 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).
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! Is there a way to automatically import all needed dlls (references) whenever i import my button?
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. Is there a way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
右键单击参考->属性-> set Copy Local = True
如果即使这样,dll 也没有被复制,那么您可能在 GAC 中引用它们。您必须删除这些 GAC 引用...
请参阅 http://msdn.microsoft.com/en-us/library/wkze6zky(v=vs.80).aspx
Right click the reference -> Properties -> set Copy Local = True
If even with this, the dlls is not being copied, them you're probably referencing them in the GAC. You'll have to remove those GAC references...
See http://msdn.microsoft.com/en-us/library/wkze6zky(v=vs.80).aspx