Publishing Visual Studio extensions with Visual Studio 2010 and Visual Studio 11 support

Out of the box Visual Studio 2010 supports extensions development only for VS 2010 and Visual Studio 11 supports extensions development only for VS 11. If your Visual Studio extension supports both VS 2010/VS 11 and doesn’t contain much version specific code you may want to develop it in Visual Studio 2010 and just specify that it supports Visual Studio 11 as well.

Normally you specify what Visual Studio versions and editions your extension supports in the Select Visual Studio Version and Edition dialog available in the manifest designer:

Manifest designer in Visual Studio 2010

Manifest designer in Visual Studio 2010


Select Visual Studio Version and Edition dialog in Visual Studio 2010

Select Visual Studio Version and Edition dialog in Visual Studio 2010


But this dialog in Visual Studio 2010 doesn’t let you specify Visual Studio 11 support. You have to modify the manifest manually. Open source.extension.vsixmanifest in the code editor by selecting ViewCode from the designer view and add the Visual Studio 11.0 tag copying the existing Visual Studio 10.0 tag:

<VisualStudio Version="11.0">
  <Edition>Pro</Edition>
</VisualStudio>
Visual Studio extension manifest with both Visual Studio 2010 and Visual Studio 11 support

Visual Studio extension manifest with both Visual Studio 2010 and Visual Studio 11 support

Specifying only the Pro edition means that the Premium and Ultimate editions are also supported. Additionally you can increase the MaxVersion attribute of SupportedFrameworkRuntimeEdition from 4.0 to 4.5. For Visual Studio 11 extensions default framework version is 4.5, but extensions with specified max version 4.0 work in VS 11 just fine in practice.

That’s all. Your extension can now be installed in both Visual Studio 2010 and Visual Studio 11.

 

 

Organize Visual Studio tabs with Tabs Studio add-in

This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

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