Walkthrough: Publishing a Visual Studio Extension
Note
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
Note: The Visual Studio Gallery is being replaced by the Visual Studio Marketplace. See the latest version of this topic for details.
This walkthrough shows you how to publish a Visual Studio extension to the Visual Studio Gallery. When you add your extension to the Gallery, developers can use Extensions and Updates to browse there for new and updated extensions.
Prerequisites
To follow this walkthrough, you must install the Visual Studio SDK. For more information, see Visual Studio SDK.
Create a Visual Studio Extension
In this case we will use a default VSPackage extension, but the same steps are valid for every kind of extension.
- Create a VSPackage in C# named
TestPublishing
that has a menu command. For more information, see Creating an Extension with a Menu Command.
Test the Extension
Before you distribute the extension, build and test it to make sure it is installed correctly in the experimental instance of Visual Studio.
In Visual Studio, start debugging. to open an experimental instance of Visual Studio.
In the experimental instance, go to the Tools menu and click Extension Manager. The TestPublishing extension should appear in the center pane and be enabled.
On the Tools menu, make sure you see the test command.
Publish the Extension to the Visual Studio Gallery
Now you can publish the extension to the Visual Studio Gallery.
Make sure that you have built the Release version of your extension and that it is up-to-date.
In a web browser, open the Visual Studio Marketplace website.
In the upper-right corner, click SIGN IN.
Use your Microsoft account to sign in. If you do not have a Microsoft account, you can create one at this point.
Click Upload.
In Step 1: Extension Type, select Tool and then click Next.
In Step 2: Upload, you can choose to upload directly to Visual Studio Gallery or just add a link to your own website. In this case select I would like to upload my tool. The Select your control box appears. Click Browse and then select TestPublish.vsix in the \bin\Release folder of the project. Click Next.
In Step 3: Basic Information, fields from the source.extension.vsixmanifest file are displayed. Select an appropriate Category and add Tags to help users find your extension. You may want to add a more detailed summary and description (the description must be at least 280 characters long). Leave Extension Type as Not a Microsoft Extension and Cost Category as Trial.
Read the Contribution Agreement at the bottom of the page and check I agree.
Click Create Contribution. This displays the page your extension will have on the Visual Studio Gallery, with a message that the page has not yet been published.
Click Publish.
Search the Visual Studio Gallery for your extension. The listing for the TestPublish extension should appear.
Install the Extension from the Visual Studio Gallery
Now that the extension is published, install it in Visual Studio and test it there.
In Visual Studio, on the Tools menu, click Extensions and Updates.
Click Online and then search for TestPublish. The listing for the TestPublish extension should appear.
Click Download. After the extension is downloaded, click Install.
To complete the installation, restart Visual Studio.
Removing the Extension
You can remove the extension from the Visual Studio Gallery and from your computer.
To remove the extension from the Visual Studio Gallery
Open the Visual Studio Marketplace website.
In the upper-right corner, click My Extenions. The listing for TestPublish is displayed.
Click Delete.
To remove the extension from your computer
In Visual Studio, on the Tools menu, click Extension Manager.
Select TestPublish and then click Uninstall.
To complete the uninstallation, restart Visual Studio.