Starting to Develop Visual Studio Extensions

 

If you’ve never written a Visual Studio extension before, you probably have some questions. We’ve listed some of the most common ones here. If you don’t see the information you’re looking for, use the feedback buttons (Was this page helpful? at the bottom of the screen) to ask for what you want.

You need to install the Visual Studio 2015 SDK in addition to Visual Studio 2015 in order to develop Visual Studio extensions. You can install the Visual Studio 2015 SDK as part of regular setup, or you can install it later on. For more information about installing the Visual Studio SDK, see Visual Studio SDK.

The sky’s the limit when it comes to imagining different Visual Studio extensions. Of course, most extensions have something to do with writing code, but that doesn’t have to be the case. Here are some examples of the kinds of extensions you can build:

  • Support for languages that aren’t included in Visual Studio, with syntax coloring, IntelliSense, and compiler and debug support

  • Productivity tools that extend the core IDE experience with additional templates, code refactoring, new dialogs or tool windows

  • Domain-specific designers for scenarios like data design or cloud support

For examples of extensions, check out the Visual Studio Gallery. You can also take a look at Visual Studio Open Source Extensions.

In theory, you can extend just about any part of Visual Studio: menus, toolbars, commands, windows, solutions, projects, editors, and so on.

In practice, we have found that the features most people want to extend are commands, menus and toolbars, windows, IntelliSense, and projects. Here are links to the relevant sections:

The two main types of extensions are VSPackages and MEF extensions. In general, VSPackage extensions are used for extensions that use or extend commands, tool windows, and projects. MEF extensions are used to extend or customize the Visual Studio editor.

For Visual C# and Visual Basic extensions, the VSSDK provides an empty VSIX project template that you can use together with the new item templates that create menu commands, tool windows, and editor extensions. For more information, see What's New in the Visual Studio 2015 SDK. You can also use this template to package project templates, code snippets, and other artifacts for distribution to other users.

For C++, the VSPackage wizard provides the code to add menu commands, tool windows, and custom editors.

The Isolated Shell template is used to package an extension in a version of the Visual Studio shell that you can brand and distribute as your own. The following topics show you how to get started with each kind of extension:

Get great tips for designing the UI for your extension in Visual Studio User Experience Guidelines.

Each of the links listed in the preceding section have step-by-step walkthroughs that show you how to implement specific features. You can also find open source VSSDK samples on GitHub at Visual Studio Samples.

You can install your extension on another computer or send it to your friends as a .vsix file, which you install by double-clicking it. You can find out more about VSIX packages at Shipping Visual Studio Extensions.

You can also publish your extension on the Visual Studio Gallery, which makes it visible to large numbers of Visual Studio customers. For an example of packaging an extension for the Gallery, see Walkthrough: Publishing a Visual Studio Extension. For more information about what you need to do to publish on the Gallery, see Products and Extensions for Visual Studio.

Show: