다음을 통해 공유


VSIX Project Template

You can use the VSIX Project template to wrap one or more Visual Studio extensions in a VSIX package, and then publish the package on the Visual Studio Gallery Web site. 

VSIX deployment supports VSPackages, assemblies, MEF components, project templates, item templates, toolbox controls, and custom extension types.

Where to Find the VSIX Project Template

The VSIX Project template is available in the New Project dialog box. On the File menu, point to New and then click Project. Depending on the programming language you are using, in the Installed Templates list, expand either the Visual Basic node or the Visual C# node, and then click Extensibility. The VSIX Project template appears in the Templates pane.

Uses of the VSIX Project Template

The VSIX Project template has these two main uses:

  • To deploy project templates, item templates, and other extensions that do not already have VSIX support.

  • To wrap the outputs of multiple extensions into one deployment package.

You do not have to use the VSIX Project template to deploy VSPackages or other kinds of extensions that already have VSIX support.

Packaging an Extension in an Empty VSIX Project

You can package an existing extension, or an extension that does not already have VSIX support, by wrapping it in an empty VSIX project. The extension to be wrapped must be of a type that is supported by the VSIX schema.

To package an extension by using a VSIX project

  1. Build the projects that make up your extension.

  2. Create a VSIX project by using the VSIX Project template.

    Source.extension.vsixmanifest opens in Manifest Designer.

  3. To add an extension that is already in a VSIX package, click Add Reference.

    Select the Add payload to VSIX option.

    Click the ellipsis (...) button and then select the .vsix file of the extension you want to add.

    Click OK.

  4. To add an extension that is not already in a VSIX package, for example, an item template or a compiled assembly, click Add Content.

    In the Select a content type list, select the type of extension to add. If you select Custom Extension Type, you must provide the name of the extension type.

    Under Select a Source, select File and then type the file name of the compiled or compressed extension.

    Click OK.

  5. If you want your package to include additional extensions, add them in the same manner.

  6. Build the solution.

    Visual Studio builds a .vsix file that contains a VSIX manifest file, a [Content_Types].xml file, and all of the extensions that you added to the project.

See Also

Other Resources

Visual Studio Extension Deployment

VSX Schema for Extensions

Installing and Managing Visual Studio Tools and Extensions