Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio do not add my component (from a DLL) to the toolbox even if I reference it

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.

like image 829
Francesco Belladonna Avatar asked Jan 07 '11 00:01

Francesco Belladonna


People also ask

How do I add a DLL reference in Visual Studio code?

I create a project with dotnet and then open it with Visual Studio 2019. Then click project, Add reference, browse to Dll, then save project (save a solution incase you want to open it again with file) Now open it with vscode.


1 Answers

I had this problem with @AndrewFinnell's solution:

There are no components in 'c:....\XXXX.dll' that can be placed on the toolbox.

So I solved with drag and drop:

  • open Windows explorer and navigate to the DLL
  • drag the DLL and drop it on Visual Studio in the Toolbox, exactly where you want your components to appear.

I also realized that some components may have compatibility issues with certain .NET Framework versions. For instance A Professional Calendar/Agenda View That You Will Use seems not to work with .NET 4.5, while it does with .NET 4.

like image 57
bluish Avatar answered Sep 21 '22 11:09

bluish