即使我引用它,Visual Studio也不会将我的组件(从DLL)添加到工具箱 [英] Visual Studio do not add my component (from a DLL) to the toolbox even if I reference it

查看:211
本文介绍了即使我引用它,Visual Studio也不会将我的组件(从DLL)添加到工具箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如标题所述,我将Visual Studio项目中的DLL复制到内容和永远复制中。添加了对此DLL的引用并将其设置为本地复制。



我成功地通过代码将我的组件实例化为表单,但不会出现在工具箱,真的很无聊。



如何解决这个问题?



如果我直接链接到DLL项目这个项目是有效的,但现在我将DLL视为外部,所以它不是DLL项目的一个解决方案。

解决方案

我发现这个工作的方式是:


  1. 添加dll,引用它

  2. 编译项​​目

  3. 保存解决方案并重新启动visual studio

然后控件显示在工具箱中(不总是工作,我认为是一种视觉工作室的错误)


As stated in the title, I copied my DLL in Visual Studio project, set it to "content" and "copy always". Added a reference to this DLL and set it to "copy locally".

I successfully managed to instance my component to a form through code but it doesn't appear in the toolbox, really boring.

How can I solve this issue?

If I link directly the DLL project to this project it works, but now I'm treating the DLL as "external" so it's not part of the same solution of the DLL project.

解决方案

The way I found to make this working is:

  1. Add the dll, reference it
  2. Compile the project
  3. Save the solution and restart visual studio

And then controls show up in toolbox (not always working, I think is a sort of visual studio bug)

这篇关于即使我引用它,Visual Studio也不会将我的组件(从DLL)添加到工具箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆