Compiling VS 2012 with VS 2013/2015

I wrote this extension when VS 2012 came out. At that time I compiled the extension on VS 2012 and only targeted VS 2012.

Then when VS 2013 came out, I recompiled the extension so that it could be installed on VS 2013 as well. The extension code itself works on VS 2012/2013/2015 without changes. So, to allow installation on VS 2013, I only updated .vsixmanifest

to change the required VS version:

<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="11.0" />

      

to

<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0,12.0]" />

      

And it seemed to work fine.

However, when I later got rid of the VS 2012 installation and wanted to compile the extension on VS 2013, I got a problem with the following links:

<Reference Include="Microsoft.VisualStudio.CoreUtility, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.Editor, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.Text.Data, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.Text.UI, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />

      

Version 11 of these assemblies was not found. I edited the project file:

<Reference Include="Microsoft.VisualStudio.CoreUtility" />
<Reference Include="Microsoft.VisualStudio.Editor" />
<Reference Include="Microsoft.VisualStudio.Text.Data" />
<Reference Include="Microsoft.VisualStudio.Text.UI" />
<Reference Include="Microsoft.VisualStudio.Text.UI.Wpf" />

      

It then compiled and worked fine on VS 2013, but apparently the extension will require a later version of these assemblies available only on VS 2013. So the extension can no longer be installed on VS 2012. I now have a similar issue with VS 2015.

I thought I could install VS 2012 SDK and that would give me version 11 of these assemblies to compile, however this SDK cannot be installed without VS 2012 installed first.

Is there a way to compile this extension with VS 2015, allowing the extension to be installed on VS up to 2012?

+3


source to share


2 answers


Someone downloaded the required SDK assemblies to NuGet. Start your search here: https://www.nuget.org/packages?q=VSSDK.Shell



+3


source


I noticed that there are different versions of extensions for each version of Visual Studio.

If VS is specific about the versions of assemblies it speaks to, I would guess the short answer is no, you cannot have one project with one set of dependencies and create extensions that work with all versions of Visual Studio.



It might just be possible to create a copy of the correct versions of the required assemblies and still compile the extension for an earlier version of Visual Studio in the latest version. But you need to have assemblies.

This is why I prefer to check third party assemblies against the original control and save every version of the assembly used. You can manage it with tags and / or branches for each version of your extension.

0


source







All Articles