Visual Studio do not add my component (from a DLL)

2019-01-26 05:13发布

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.

7条回答
萌系小妹纸
2楼-- · 2019-01-26 06:05

I tried following the other answers (thanks to all of you!), but I got this problem and I'll let you all know how I solved it and show my custom tools in toolbar (in VS 2017).

  1. Place the .ddl file in any Library Solution
  2. Then I add that .ddl as reference to my needed project
  3. Build the project and restart the Visual Studio
  4. Then, when I look into toolbox, my custom toolbox name appears in toolbar, when I expand that I got below message

    There are no Usable controls in this group. Drag an item onto this text to add in to toolbok

    enter image description here

  5. I dragged the .dll and dropped under that text and then all my custom tools appeared in my toolbox.

查看更多
登录 后发表回答