How to: Create and Distribute Toolbox Controls
You can create a custom toolbox control in either Visual Basic or C#. There are two project templates you can use, one for a Windows Forms-based control and another for a WPF-based control. You can find these templates at File/New/Project/(Visual Basic or C#)/Extensibility. For more information, see How to: Create a Toolbox Control That Uses WPF or How to: Create a Toolbox Control That Uses Windows Forms.
After you have created your control, you can distribute it to your teammates or publish it on the Web by using the Visual Studio Content Installer. The Content Installer installs .vsi files, which are compressed files that contain the assembly for the control and a manifest that has a .vscontent file name extension.
It is highly recommended that you sign your control component, and that you exercise caution when installing .vsi files you have received from other people or downloaded from the Web.
To create a .vscontent file
Create a new XML file and name it <assemblyName>.vscontent.
Add the following .vscontent template:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005"> <Content> <FileName></FileName> <DisplayName></DisplayName> <Description> </Description> <FileContentType>Toolbox Control</FileContentType> <ContentVersion>2.0</ContentVersion> </Content> </VSContent>
Fill in the <FileName>, <DisplayName>, and <Description> elements with your information.
Save the .vscontent file in the same directory as the assembly that contains the control.
To create a .vsi file
Add the assembly for the custom control and the .vscontent file to a compressed or zip file.
Change the .zip file name extension to .vsi.
To install a .vsi file
Double-click the .vsi file.
The Visual Studio Content Installer appears.
On the Select Content to Install page, select the item or items that you want to install and then click Next. If the component is not signed, you may see a warning.
For additional security, click Review to display a list of the files that will be installed on your computer.
On the Content Installation page, click Finish to install the control.
Click Close to exit the installer.
The control will appear in the My Controls section of the Toolbox.