Monday, April 16, 2012 7:15 AM
I have defined a custom control in C# and I have created the vsi file for installing it in the toolbox of VS2010. The vsi file works well but installs the control in a generic tab "My Controls", is it possible to specify in which tab to visualise the control? And if it possible, how can I create a new tab in the toolbox without adding it manually?
Thank you in advance for any advice or help.
Tuesday, April 17, 2012 9:48 AMModerator
After we have located a control that has been packaged as a .vsi file, we can easily install the control for use in Visual Studio.
To install a custom control packaged in a .vsi file
- Double-click the .vsi file.
The Visual Studio Content Installer appears.
- On the Select Content to Install page, select the items that you want to install and then click Next. If the component is not signed, a warning might appear.
- On the Content Installation page, click Finish to install the control.
If Visual Studio is not currently open, the installer will open and then close Visual Studio during the installation process.
- Click Close to exit the installer.
The control will appear in the My Controls section of the Toolbox.
More information: http://msdn.microsoft.com/en-us/library/ms165358.aspx
Lucy Liu [MSFT]
MSDN Community Support | Feedback to us
Wednesday, April 18, 2012 2:13 AMModerator
A better solution for VS 2010, is to use the project template that allows you to build and deploy your control with a .VSIX file. The VSI stuff is pretty dated, and the VSIX deployment is much simpler to set up.
If you create a new project using the "Windows Forms Toolbox Control" project template, or the "WPF Toolbox Control" project template, you'll notice that there is a ProvideToolboxControl atttribute applied to your control class. This attribute takes a string that names the group the control is installed under. For example:
When you build the project, a .PKGDEF file is created with the necessary registry settings that will tell the VS toolbox service about your control. All you need to do is install the .VSIX file. It'll deploy your contol, and register it with the toolbox.
See the following for details: