I'm working on a Windows Forms project in Visual Studio 2012.
In the solution of the project, I created a new Folder named userControls
and added to it a user-control (UserControl1
).
Here is the tree view of the solution:
How can I access the UserControl
in that folder from the ToolBox
?
Rebuilding the Solution and restarting Visual Studio didn't solve my problem.
User controls which are in the current project will be added to toolbox automatically after a successful build and you don't need to perform additional tasks to do so.
Such problems which the toolbox not being populated with new user controls, are usually build error or designer errors. To solve the problem you can perform these tasks:
Delete Visual Studio designer cached files. To do so, go to below path and delete all folders:
Delete
bin
andobj
folder of your projects.1.You can add this to you Toolbox using
Select your assembly with the
UserControl
.2.Build the entire solution. After that, your
UserControl
should appear in thetoolbox
.