Export (0) Print
Expand All

How to: Package Community Components to Use the Visual Studio Content Installer 

You can create and share items for use in Visual Studio. Types of items can include starter kits, item templates, controls, code snippets, or add-ins, among others. To make it easier for other developers to use your item from within Visual Studio, you can package the item in a .vsi file, which is typically referred to as a community component, so that it can be installed using the Visual Studio Content Installer. The Visual Studio Content Installer automatically copies the items in community components to the correct directories on a developer's computer so that the items appear in the correct dialog boxes in Visual Studio.

To use the Visual Studio Content Installer to install your community components, you must create a .vscontent file for the component. After you create the .vscontent file, you compress the component files and the .vscontent file into a .zip file and change the file extension from .zip to .vsi. You then can distribute the .vsi file to other developers using whatever method you choose, such as making the file available for download from the Web, sending the file as an e-mail attachment, or posting the file on a network share.

.VSI Files

Visual Studio Content Installer (.vsi) files are used to exchange Visual Studio content in the developer community. A .vsi file is a renamed .zip file that contains these components:

  • An XML .vscontent file that describes the content.

  • The content files.

The Visual Studio Content Installer uses .vsi files to install shared content to the proper location. For more information about installing .vsi files, see How to: Install Community Components.

Some features of the Visual Studio Content Installer require additional tools or services to implement.

  • To display publisher information for your community component in the Visual Studio Content Installer, you must sign the .vsi file. For more information, see Cryptography Overview.

  • To display an End User License Agreement (EULA) in the Visual Studio Content Installer, you must embed this information in the .zip file. WinZip supports including embedded information through the Comment feature. For more information about WinZip, see http://www.winzip.com. For more information about the Comment feature, see the WinZip Help file.

To create a basic .vsi file

  1. Create a valid .vscontent file for the content. For schema information, see Visual Studio Content Installer Schema Reference.

  2. In Windows Explorer, select the files to include in the .vsi file (including the .vscontent file).

  3. Right-click the selected files, point to Send To, and click Compressed (zipped) Folder.

    The selected files are compressed into a single .zip file.

  4. Rename the extension of the .zip file to .vsi.

Example

The following example shows a .vscontent file for a .vsi file that contains an add-in. The following files would be included in the .vsi file for this content:

  • A .vscontent file that contains the XML shown in this example.

  • The add-in registration file MyAddin.Addin.

  • The compiled add-in .dll file MyAddin.dll.

The add-in files are installed in the following directory:

n:\...\Visual Studio 2005\Addins\

For additional examples, see How to: Publish Project Templates and How to: Publish Code Snippets.

<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005"> 
    <Content>
        <FileName>MyAddin.Addin</FileName>
        <FileName>MyAddin.dll</FileName>
        <DisplayName>Example Add-in</DisplayName>
        <Description>An add-in created for this example.</Description>
        <FileContentType>Addin</FileContentType>
        <ContentVersion>1.0</ContentVersion>
    </Content>
</VSContent>

The following example shows a .vscontent file for a .vsi file that contains a macro project. The following files would be included in the .vsi file for this content:

  • A .vscontent file that contains the XML shown in this example.

  • The macro file MyMacroProject.vsmacros.

The macro file is installed in the following directory:

n:\...\Visual Studio 2005\Projects\VSMacros80\

<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
    <Content>
        <FileName>MyMacroProject.vsmacros</FileName>
        <DisplayName>My Macro Project</DisplayName>
        <Description> A macro project created for this example.</Description>
        <FileContentType>Macro Project</FileContentType>
        <ContentVersion>1.0</ContentVersion>
    </Content>
</VSContent>

See Also

Community Additions

ADD
Show:
© 2014 Microsoft