How to create a VSIX project in Visual Studio 2013

In my last post I’ve shown how to create a project template from an existing project by exporting it. Now we will go through the creation of a simple VSIX to package our project template.

Steps before creating a VSIX project

  • Install the Visual Studio 2013 SDK which you can download from here.
  • If you have not created a project template before, read this post.

Creating the VSIX project
1. Open the New Project menu through File / New / Project

2. Select the Visual C# / Extensibility / VSIX project which is available after installing the SDK.
Creating a VSIX project

3. When the project is created the source.extension.vsixmanifest file is automatically opened in design mode.
VSIX manifest design mode

4. The only required fields are the following:

  • Product Name:  The name that will appear in the Extension manager.
  • Product ID:  Unique identifier of the VSIX. It is a good idea to leave the GUID in it making sure it has a unique as Extension Manager uses this ID to check if it has an update.
  • Description: The description that will be displayed in the Extension manager.

5. Next we need to add the project template zip file to the assets, to do this go to the Assets tab at vsixmanifest Design view and click on the New button.
Assets tab

6. In the popup window you should select the following values where the template file should be the one which you exported from the MiniCrawler project (by default found at C:\Users\(username)\Documents\Visual Studio 2013\Templates\ProjectTemplates):
Add new asset

7. After clicking the OK button, the file is automatically added to the project inside the ProjectTemplates folder.
05_project_layout

8. Now, build the solution and at the Debug or Release folder, there will be a MiniCrawlerVSIX.vsix file, that you can use to install this project template. As this name looks a bit silly, I recommend to change the Assembly name in the project properties to MiniCrawler so the VSIX file won’t contain the VSIX suffix.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s