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 Extension Manager to find and install them. For more information about Extension Manager, see Installing and Managing Visual Studio Tools and Extensions.
The VSIX format does not support the installation of macros, 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 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.
备注
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, Extension Manager uncompresses the .vsix file and puts its contents in %LocalAppData%\Microsoft\VisualStudio\10.0\Extensions\Company\Product\Version\. Company, Product, and Version are specified in the extension.vsixmanifest file, and correspond to the namespace, project name, and version number that are set in the project properties.
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 in ..\Visual Studio installation folder\Common7\IDE\Extensions\Company\Product\Version\, and will be available to all users of the system.
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, Extension Manager shows the user a list of the missing assemblies.
If the extension manifest includes one or more Reference elements, Extension Manager 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.
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 Extension Manager. 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.
Related Topics
Title |
Description |
---|---|
Describes the components of a VSIX package. |
|
Provides step-by-step instructions about how to package and publish an extension. |
|
Explains how to provide localized text for the installation process by using extension.vsixlangpack files. |
|
Describes how to update an extension on your system and how to deploy an update to an existing Visual Studio extension. |
|
Describes how to add references to VSIX deployment packages. |
Reference
Microsoft.VisualStudio.ExtensionManager
Change History
Date |
History |
Reason |
---|---|---|
July 2010 |
Added information to the Dependency Handling section. |
Information enhancement. |