12

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?

bluish
  • 26,356
  • 27
  • 122
  • 180
Arianule
  • 8,811
  • 45
  • 116
  • 174
  • 1
    Ensure that the control is inhering from the `System.Windows.Forms.Control` class and is `public`. – Kami Jan 07 '13 at 15:49

5 Answers5

47

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
bluish
  • 26,356
  • 27
  • 122
  • 180
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.

bluish
  • 26,356
  • 27
  • 122
  • 180
MikeT
  • 5,398
  • 3
  • 27
  • 43
2

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.
Bright
  • 31
  • 3
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.

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

Pierre
  • 1