Packaging Add-ins and Toolbox Controls for use with Visual Studio Content Installer
The Visual Studio Content Installer allows users to install community content such as add-ins, toolbox controls etc. The Visual Studio Content Installer uses a Visual Studio Installer (VSI) file which contains the content to install. Each VSI file contains a .vscontent file and the content files. The .vscontent file describes the content to install.
Creating a VSI that will install add-ins is very easy as indicated by the following steps:
1. Create the add-in(s)/toolbox controls you want to install.
2. Create a folder such as MyContent and copy all the .addin(s) and .dll(s) files for your content to this folder. This folder is optional although it helps bring all the content you want to a single place.
3. Create a .vscontent files such as the following in the folder:
<?xml version="1.0" encoding="utf-8" ?>
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName>MyAddin.dll</FileName>
<FileName>MyAddin.addin</FileName>
<DisplayName>My Addin</DisplayName>
<Description>This is my addin</Description>
<FileContentType>Addin</FileContentType>
<ContentVersion>1.0</ContentVersion>
</Content>
<!-- If you have more add-ins than you need to create multiple Content tags, one for each add-in -->
<Content>
<FileName>MyToolboxControlLibrary.dll</FileName>
<DisplayName>My Toolbox Controls</DisplayName>
<Description>These are my toolbox controls</Description>
<FileContentType>Toolbox Control</FileContentType>
<ContentVersion>1.0</ContentVersion>
</Content>
<!-- If you have more controls than you need to create multiple Content tags, one for each control -->
</VSContent>
4. Now create a zip file that contains all the files in the folder. Please note that the zip file should not contain the folder information as that is not needed. E.g. the files in the zip file will be something like the following without the path information:
MyAddin.addin
MyAddin.dll
MyToolboxControlLibrary.dll
MyContent.vscontent
5. Rename the zip file to be .vsi.
That's it. You have a VSI file that will install your add-in using the Visual Studio Content Installer.