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

社会主义新天地 提交于 2019-12-13 11:39:36

问题


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?


回答1:


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.




回答2:


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



回答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.


来源:https://stackoverflow.com/questions/14199202/there-are-no-components-in-dll-that-can-be-placed-on-toolbox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!