Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 321
Arianule Avatar asked Jan 07 '13 15:01

Arianule


People also ask

How do I add components to my toolbox?

Right-click in the Toolbox, and from the pop-up menu choose Customize Toolbox, Add/Remove Items, or Choose Items (depending on the version of Visual Studio). In the Customize Toolbox dialog, click the . NET Framework Components tab.

How do I add a DLL Toolbox in Visual Studio?

Right click on the toolbox on a tab to add a DLL generated by a class project. Select "Choose Item" to add a DLL to the current tab or first create a tab. Browse for the DLL and follow the prompts.

How do I populate my toolbox in Visual Studio?

From the Tools menu, click the Options item. Click General under the Windows Forms Designer item and ensure that the AutoToolboxPopulate option is set to True.


3 Answers

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
like image 186
bluish Avatar answered Sep 22 '22 18:09

bluish


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.
like image 32
Bright Avatar answered Sep 23 '22 18:09

Bright


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.

like image 32
MikeT Avatar answered Sep 22 '22 18:09

MikeT