다음을 통해 공유


VSIX Deployment

You can use the VSIX format to package project templates, item templates, Visual Studio Integration Packages, Managed Extensibility Framework (MEF) components, Toolbox controls, assemblies, and custom types (this includes custom Start Pages). The VSIX format uses file-based deployment and does not support writing to the Global Assembly Cache (GAC) or to the system registry. We recommend that you use VSIX deployment for the kinds of extensions that it supports.

When you upload extensions that have the VSIX package format to the Visual Studio Gallery Web site, users can use Extensions and Updates to find and install them. For more information, see Managing Extensions and Updates for Visual Studio.

The VSIX format does not support the installation of add-ins or code snippets. It also does not support certain other scenarios such as writing registry keys during Setup. For a comparison of other available deployment strategies, see PAVE Visual Studio Extension Deployment.

To prevent conflicts when you are developing an extension, we recommend that you uninstall earlier versions of the extension, and uninstall or disable potentially conflicting extensions.

The VSIX Package

A VSIX package is a compressed file that follows the Open Packaging Conventions (OPC) standard. The package contains binaries and supporting files, together with a [Content_Types].xml file and a .vsix manifest file. One VSIX package may contain the output of multiple projects, or even multiple packages that have their own manifests. For more information about the contents of a VSIX package, see Anatomy of a VSIX Package.

Most of the project templates in the Visual Studio SDK create a VSIX package for you when you build your project. You can also create a VSIX package around your extension by creating a blank VSIX Project, and then adding your extension to it. For more information about how to create a VSIX package, see VSIX Project Template.

Note

Names of files that are included in VSIX packages must not include spaces, nor characters that are reserved in the Uniform Resource Identifiers (URI) specification, as defined under [RFC2396].

Installation Location

During installation, Extensions and Updates uncompresses the .vsix file and puts its contents in a random folder under %LocalAppData%\Microsoft\VisualStudio\12.0\Extensions. The name of that folder follows the 8.3 convention.

By default, the installation applies only to the current user, because %LocalAppData% is a user-specific directory. However, if you set the AllUsers element of the manifest to True, the extension will be installed under ..\VisualStudioInstallationFolder\Common7\IDE\Extensions and will be available to all users of the computer.

Dependency Handling

If a user tries to install an extension that has dependencies, the installer verifies that the required assemblies are installed on the user system. If the required assemblies are not found, Extensions and Updates displays a list of the missing assemblies.

If the extension manifest includes one or more Reference elements, Extensions and Updates compares the manifest of each reference to the extensions that are installed on the system, and installs the referenced extension if it is not already installed. If an earlier version of a referenced extension is installed, the newer version replaces it.

By default in a multi-project solution, if a project that outputs to a VSIX package includes a reference to another project in the same solution, it includes the dependencies of that project. You can override this behavior by clicking the reference for the internal project, and then, in the Properties window, setting the Output Groups Included in VSIX property to BuiltProjectOutputGroup.

To include satellite DLLs from referenced assemblies in the VSIX package, add SatelliteDllsProjectOutputGroup to the Output Groups Included in VSIX property.

Publication

You can distribute a VSIX package by putting it on the Visual Studio Gallery website so that it is available to Visual Studio users through Extensions and Updates. Alternatively, you can upload the package to another website or to a network share, so that users can install the extension by double-clicking the .vsix file and following the instructions.

Private Galleries

As you develop controls, templates, and tools, you can share them with your organization by posting them to a private gallery on your intranet. For more information, see Private Galleries.

Title

Description

Anatomy of a VSIX Package

Describes the components of a VSIX package.

VSIX Project Template

Provides step-by-step instructions about how to package and publish an extension.

Localizing VSIX Packages

Explains how to provide localized text for the installation process by using extension.vsixlangpack files.

How to: Update a Visual Studio Extension

Describes how to update an extension on your system and how to deploy an update to an existing Visual Studio extension.

How to: Add a Dependency to a VSIX Package

Describes how to add references to VSIX deployment packages.

Reference

Microsoft.VisualStudio.ExtensionManager

IExtension

IVsExtensionManager

SVsExtensionManager