Multiple Visual Studio Versions, One Extension


Carlos Quintero, Friend of the Blog, has written up a great MSDN Magazine article that's perfect for our Visual Studio Extension Monday highlight...

Visual Studio - Creating Extensions for Multiple Visual Studio Versions

The release of a new version of Visual Studio is always a challenge for developers of extensions (packages, add-ins, templates and so forth). For example, Visual Studio 2010 introduced the new Visual Studio Installer for eXtensions (VSIX files); Visual Studio 2012 introduced the light/dark themes; and Visual Studio 2015 removed add-ins (with the Add-In Manager); not to mention that each Visual Studio version provides a new SDK, new extensibility assemblies and new APIs. With Visual Studio 2017, this challenge is even bigger, due to its new modular setup based on workloads and individual components, and to a new version of the manifest for the VSIX deployment mechanism. While some developers (most notably from Microsoft) release a different new extension for each Visual Studio version, most would prefer to release a single updated extension that can target the widest range of Visual Studio versions.

In this article, I’ll show you how to accomplish this. For this purpose, I’ll focus on the most common scenario: a package with a command, created in a managed language (C#, in this case) and deployed as a VSIX file.

The goals to be accomplished are the following:

  • To use a single Visual Studio project to create the package.
  • To use Visual Studio 2017 for development and debugging.
  • To generate a single package DLL as the result of the build.
  • To put that single DLL inside a single VSIX file.
  • To be able to install that VSIX file on Visual Studio 2017 and on many past versions (2015, 2013 and so on).



The VSIX File ...

The Package DLL ...

Developing the Extension ...


Once you’re done with the development and debugging, you can build your extension in Release configuration and test it on Visual Studio versions installed in isolated instances on test machines. If everything goes well, you can then publish your extension on the Visual Studio Marketplace!     

[Click through to read the article]

The Discussion

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.