I wrote this extension when VS 2012 came out. At the time I compiled the extension on VS 2012 and only targeted VS 2012.
Then when VS 2013 came out I recompiled the extension so it could also be installed on VS 2013. The extension code itself works on VS 2012/2013/2015 without changes. So, to allow the installation on VS 2013 I only updated the .vsixmanifest
, changing the required VS version from:
<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 my VS 2012 installation and wanted to compile the extension on VS 2013, I had a problem with the following references:
<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 could not be found. I edited the project file to:
<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" />
Then it compiled and ran fine on VS 2013 but apparently the extension would then require a later version of these assemblies, only available on VS 2013. Thus the extension could no longer be installed on VS 2012. I'm now having a similar problem with VS 2015.
I thought I would install the VS 2012 SDK and that would provide me with version 11 of these assemblies, to compile against them, however this SDK cannot be installed without first installing VS 2012.
Is there any way to compile this extension from VS 2015, while allowing the extension to be installed on VS all the way back to version 2012?
Someone uploaded the required SDK assemblies on NuGet. Start searching here: https://www.nuget.org/packages?q=VSSDK.Shell