Closed jameswiseman76 closed 4 years ago
Regarding targeted version
Those InstallationTarget entries in the vsixmanifest control which versions of Visual Studio the extension will install to (regardless of whether it works for that version or not)
It will install to the target version or greater, so ‘Pro’ is the lowest version for VS 2012 and 2013, but ‘Community’ is the lowest version for VS 2015.
I’ve ignored the free editions of VS before 2015.
The dependencies I meant are the Visual Studio assembly references in the csproj.
By default if you create a VSPackage project in VS 2105 you’ll see references like this:
<Reference Include="Microsoft.VisualStudio.Shell.14.0 ">
If you want to support VS 2012 you’ll need to change that to Microsoft.VisualStudio.Shell.11.0. But the second gotcha is that there’s a version 14.0 of Microsoft.VisualStudio.Shell.11.0 included in VS 2015 (go figure)
So you have to be specific about the version also:
<Reference Include="Microsoft.VisualStudio.Shell.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<SpecificVersion>True</SpecificVersion>
</Reference>
More regarding targeting VS2012. @feelthesource did this for his synonyms extension. Here is the the repo: https://andylamb.visualstudio.com/DefaultCollection/DevFun/_versionControl#path=%24%2FDevFun%2FSynonyms&_a=contents
The VS 2015 (maybe 2013 too) VSPackage Project/Menu Command Item templates use NuGet for the VisualStudio dependencies. VS 2012 templates don’t. I can’t remember if in the VS 2012 templates VisualStudio dependencies are retrieved from the GAC or search paths setup by VS, either way, it works.
I got into a pickle trying to get the references I wanted (11 or less to support VS 2012, 2013, and 2015) via NuGet, so reverted to the VS 2012 technique.
There were also some additional COM references that I decided I didn’t need, so removed.
The versioning is really confusing.
10.0 VS 2010 11.0 VS 2012 12.0 VS 2013 13.0 - 14.0 VS 2015
Looking in the csproj, I think it’s a mangled (but somehow working) one. Minimum version is VS 2015, but default version is VS 2012 ???
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
Regarding Cannot rebuild the VSIX package Error upon compile: https://github.com/zpqrtbnk/Zbu.ModelsBuilder/issues/52
Regarding using context menus http://www.diaryofaninja.com/blog/2014/02/18/who-said-building-visual-studio-extensions-was-hard
Integrate JsGoogleClosureCompiler into Visual Studio