There are no components in DLL that can be placed on toolbox
Asked Answered
B

5

14

I have a DatePicker custom control that I am trying to add to toolbox. The name of the file is BasicFrame.WebControls.BasicDatePicker.dll and I go through the procedure of right click in Toolbox > Choose Items and then selecting the file after browsing to it under .NET Framework components.

I however get this error message:

There are no components in that can be placed on toolbox

Why do I get this message and how can I resolve it?

Bodega answered 7/1, 2013 at 15:44 Comment(1)
Ensure that the control is inhering from the System.Windows.Forms.Control class and is public.Toscanini
A
9

Have you checked the visibility of the custom classes?

If you haven't declared them as public they will default to internal and hence aren't exposed to Visual Studio for use.

Antonyantonym answered 7/1, 2013 at 15:57 Comment(3)
Hi, How you are doing this, because I have the same problem but I don't know what to do. ThanksPeppers
look at the classes they should say public class if they don't then the dll will hide themAntonyantonym
mine is public by default but still having the same problem.Agapanthus
P
48

In some cases you can solve this problem 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
Poriferous answered 19/12, 2013 at 15:31 Comment(3)
Worked in VS2013! Thank you very much.Samy
worked in visual studio community 2017! Thanks so muchFelicitation
10 years past. VS2022, problem persists. And your solution works!Henni
A
9

Have you checked the visibility of the custom classes?

If you haven't declared them as public they will default to internal and hence aren't exposed to Visual Studio for use.

Antonyantonym answered 7/1, 2013 at 15:57 Comment(3)
Hi, How you are doing this, because I have the same problem but I don't know what to do. ThanksPeppers
look at the classes they should say public class if they don't then the dll will hide themAntonyantonym
mine is public by default but still having the same problem.Agapanthus
T
3

Sometimes drag and drop does not work also. In this case you can

  • open Windows explorer and navigate to the DLL
  • copy the dll file and paste it directly on the toolbox tab you wish to place the controls.
Tillietillinger answered 11/2, 2018 at 5:49 Comment(0)
P
0

Visual Studio 2019 - unable to get VS2019 to recognise a simple user control. I found this was caused by having no parameter-less constructor in the control. As soon as I ensured there was a ctor with no parameters, the control was recognised. I found I was able to use constructor chaining/overloading. Hopefully this will help others having this issue.

Padua answered 18/10, 2021 at 13:7 Comment(0)
C
0

In my case it was the path to the bin folder of my MyCSharpLibrary.dll project that was too long.

I had to copy my components library a few level up, but it was working before for sure, it been a while since a have rebuild this project perhaps they have add some limitations on path length

Coincidental answered 25/7, 2023 at 0:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.