다음을 통해 공유


Visual Studio Extension Deployment

Visual Studio supports three formats for deploying extensions: Visual Studio Extension (VSIX), Windows Installer (MSI), and Visual Studio Content Installer (VSI). You can also register custom controls with Visual Studio by using Platform Registration. This topic compares the different deployments strategies, and lists their capabilities.

Selecting a Deployment Method

Select your deployment format depending on the type of extension to deploy and the capabilities of the deployment method.

VSIX

When you upload extensions in the VSIX package format to the Visual Studio Gallery Web site, users can find and install them by checking for online extensions in Extension Manager. For more information about Extension Manager, see Installing and Managing Visual Studio Tools and Extensions.

You can use the VSIX format to package project and item templates, Visual Studio Integration Packages, Managed Extensibility Framework (MEF) components, toolbox controls, assemblies, and custom types. The VSIX format uses strictly file-based deployment and does not support writing to the Global Assembly Cache (GAC), or to the system registry. VSIX is the preferred deployment method for the extension types that it supports.

VSIX deployment requires that you have the Visual Studio SDK installed. For more information, see VSIX Deployment in the Visual Studio SDK documentation.

MSI

When you create a Setup project in Visual Studio, add it to the solution that contains your extension, and build the project, you get an .msi file. The MSI format supports most application and extension types, and can perform installation operations such as writing the GAC and the system registry. Extension Manager will show and install MSI-based extensions, but cannot enable or disable them. For more information about MSI deployment, see Visual Studio Installer Deployment.

VSI

The Visual Studio Content Installer does not support uploading to Visual Studio Gallery, uninstall, or writing to the GAC or the system registry. However, you can use it to deploy macros, add-ins, and code snippets, which the VSIX format does not support. For more information, see How to: Package Components to Use the Visual Studio Content Installer.

Platform Registration

In Visual Studio 2010, registration with a managed platform in the AssemblyFoldersEx registry key includes the functionality of the Toolbox Controls Installer mechanism provided in Visual Studio 2008 and earlier. The following list shows the features supported by the AssemblyFoldersEx registration.

  • Bulk installation for all controls in a directory without having to register controls individually.

  • Support for assigning icons and grouping controls in the Toolbox.

  • Including assemblies in the Visual Studio Add References dialog box and optionally including controls in the Toolbox Choose Items dialog box.

  • Simplified registration in a single location in the base framework registry key. This avoids the complexity of checking for different Visual Studio SKUs and locating each root key.

  • Support for a single control assembly with multiple design-time assemblies that target particular Visual Studio versions or Expression Blend versions.

For information and samples using this functionality, see Deploying a Custom Control and Design-time Assemblies.

Platform Registration in MSI

To add your assemblies to the Add References dialog box and to add your controls to the Toolbox Choose Items dialog box, you must register your assemblies with the managed platform’s AssemblyFoldersEx registry key. To install your controls in the Toolbox using your icons and tab location, you must also specify values in the Toolbox registry key. For more information, see Deploying a Custom Control and Design-time Assemblies.

Supported Extension Types

The following table shows which packaging formats support which extension types.

Extension type

VSIX

MSI

VSI

Platform Registration

Project Template

Yes

No

Yes

No

Item Template

Yes

No

Yes

No

Assembly

Yes

Yes

No

Yes

MEF Component

Yes

Yes

No

No

VSPackage

Yes

Yes

No

No

Toolbox Control

Yes

Yes

Yes

Yes

Macro

No

Yes

Yes

No

Add-in

No

Yes

Yes

No

Code Snippet

No

No

Yes

No

Custom Extension Type

Yes

Yes

No

No

Supported Capabilities

The following table shows which packaging formats support which installation options.

Capability

VSIX

MSI

VSI

Platform Registration

Platform Registration in MSI

Enable and Disable installed extension

Yes

No

No

No

No

Check for updates

Yes

No

No

No

No

Write to system registry

No

Yes

No

Yes

Yes

Register with GAC

No

Yes

No

Yes

Yes

Configuration during install

No

Yes

No

Yes

Yes

Upload to Visual Studio Gallery

Yes

Yes

No

No

No

Double-click install

Yes

Yes

Yes

No

Yes

Presence in the Toolbox Choose Items dialog box

No

Yes

No

Yes

Yes

Presence in the Add References dialog box

No

Yes

No

Yes

Yes

Install before (or after) Visual Studio

No

Yes

No

Yes

Yes

Target additional designers, such as Expression Blend

No

Yes

No

Yes

Yes

Publication

You can distribute any Visual Studio extension by uploading it to a Web site or network share. If the deployment package is in the VSIX format, or is an MSI, you can make it available to Extension Manager for all Visual Studio users by uploading it to the Visual Studio Gallery Web site, which makes the package visible from Extension Manager. You can add extensions of other types to the gallery as reference links.

Title

Description

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

Describes how to package macros, add-ins and code snippets into .vsi files.

VSIX Deployment.

Describes the XML schema on which to base a .vsix manifest file for a Visual Studio extension. This topic is part of the Visual Studio SDK documentation.

Installing and Managing Visual Studio Tools and Extensions

Shows how to use Extension Manager to add, remove, and enable Visual Studio extensions.

Deploying a Custom Control and Design-time Assemblies

Shows how to register assemblies with a platform, add Toolbox presence, and add design-time support.