Walkthrough: Publishing a Visual Studio Extension
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
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.
To follow this walkthrough, you must install the Visual Studio SDK. For more information, see Visual Studio SDK.
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
TestPublishingthat has a menu command. For more information, see Creating an Extension with a Menu Command.
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.
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 Gallery 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.
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.
Search the Visual Studio Gallery for your extension. The listing for the TestPublish extension should appear.
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.
You can remove the extension from the Visual Studio Gallery and from your computer.
Open the Visual Studio Gallery website.
In the upper-right corner, click My Extenions. The listing for TestPublish is displayed.
In Visual Studio, on the Tools menu, click Extension Manager.
Select TestPublish and then click Uninstall.
To complete the uninstallation, restart Visual Studio.