Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
 How to: Package Community Component...
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio 
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 Content   What is Community Content?
Add new content RSS  Annotations
Help automate the process of creating VSI files      Craig Skibo - MSFT   |   Edit   |   Show History
For tools to help create VSI files, visit http://workspaces.gotdotnet.com/ccipowertoys and download the Visual Studio Content Installer Powertoys.
Tags What's this?: Add a tag
Flag as ContentBug
Signing VSI files      Craig Skibo - MSFT   |   Edit   |   Show History

To sign a .vsi file, you will need to follow a few steps. First, you will need to download and install the latest version of the powertoys from the URL http://workspaces.gotdotnet.com/ccipowertoys. Next, from a command line run the tool makezipexe, specifying the parameters -zipfile:pathtozipfile.zip -output:PathToOutputFile.exe. This will create an exe that can then be signed. You will need to use the Authenticode certificate that you purchase from a certificate authority to sign this file (ask your certificate issuer for more information). Once the file has been signed, you can rename PathToOutputFile.exe to PathToOutputFile.vsi, and the Content Installer will read the digital signature from the file.

If you do not download and install the power toys, and you are not using a service pack 1 or later of Visual Studio 2005, then you will receive security violations when the VSI file is opened.

Tags What's this?: Add a tag
Flag as ContentBug
Failure when reading signed content      Craig Skibo - MSFT   |   Edit   |   Show History
When opening a signed VSI file, you may receive an error with the message "Attempted to read or write the memory.This is often an indication that other memory is corrupt". Authenticode certificates require a counter-signature, but this signature cannot always be found in the certificate. For more information, contact your certificate issuer.
Tags What's this?: Add a tag
Flag as ContentBug
A new tool for creating VSI files      Alessandro Del Sole [MVP]   |   Edit   |   Show History

As an alternative, you can check out my new freeware tool called Vsi Builder, which is available from the Italian .NET Community "Visual Basic Tips & Tricks" (http://www.visual-basic.it). Vsi Builder allows creating .Vsi packages via a user-friendly graphical interface and with a few clicks.

An English-language article about Vsi Builder is available on my blog at the following address: http://community.visual-basic.it/alessandro/articles/20709.aspx

06.04.2008 Update: a new release for Vsi Builder is available. If you downloaded the previous version, please download and install this new one which has support for .NET Framework 3.5 and fixes a few bugs.

Login for download new tool      a_pros   |   Edit   |   Show History
How to download Vsi Builder if you don't know Italian? Download process precedes authorization on (http://www.visual-basic.it). Really it's hard to understand login process without Italian knowledge. But this tool seems to be very interesting for me. So, question to Alessandro Del Sole [MVP], could you explain how to login on (http://www.visual-basic.it) and download this tool, please?
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker