Yesterday I wrote about how to get old style add-ins (showing in Tools-> Add-ins Manager) to run in Visual Studio 11, demonstrated with Test Driven .NET.
Today I write about getting Visual Studio Gallery extensions (showing in Tools->Extensions Manager) to work with Visual Studio 11, demonstrated with Git Source Control Provider.
The two posts depend on minor changes to the Visual Studio 2010 versions of the plug-ins.
Visual Studio Extensions Gallery
When you run Tools->Extensions Manager in Visual Studio, it looks at Visual Studio Gallery feed and reads what’s in it. When you choose to install an extension, you download a ".vsix" file, that contains all the files of the extensions and then run it.
So, to get an extension to work with Visual Studio 11, go to the Visual Studio Gallery website to download the extension ourselves.
Now, in the "FIND" box, try to reach what you want, for this exercise we’ll look for Git Source Control Provider.
Click on the plugin you want in the result:
Then on the download link in there (verify it’s VS 2010 extension)
For this example, on http://visualstudiogallery.msdn.microsoft.com/63a7e40d-4d71-4fbb-a23b-d262124b8f4c
After download, we get the "GitSccProvider.vsix" file. Rename that to "GitSccProvider.zip", and extract it to some folder, say "GitSccProvider" (some compression programs allow you to do this without renaming. I’m here using Windows default tools).
It should look like this:
Right click "extension.vsixmanifest" and choose Open With->Notepad
It should look like (highlight is mine):
We need to do 2 things.
First, change MaxVersion (highlighted above) from "4.0" to "4.5".
Second, under <SupportedProducts>, before the opening of <VisualStudio Version="10.0">.
So, the file should look like:
Save the file, select all the files in the folder (do "not" go up and select the folder itself), right click the selection, and choose Send To-> Compressed (zipped) file.
By default, this creates a new "GitSccProvider.zip" file in the same folder,. Rename that file to "GitSccProvider.vsix" (accept Windows warning, say yes!).
Run the "GitSccProvider.vsix". It may take a short while to open, but then you should see something like:
(Note, you won’t see Visual Studio 2010 option if you have the extension installed in it already)
Now, proceed with "Install", after it’s done, close it, and run a new instance of Visual Studio.
You should be able to find it installed under Tools-> Extension Manager:
That’s it. Use the same concept for other extensions in the gallery (read the warning at the end of the post though).
Notes About Git Source Control Provider
Because this specific extension is a source control provider, to use it, you need to go to Tools->Options->Source Control and explicitly choose to use it. This is not the case for non source control provider plug-ins (i.e. not the case for the very vast majority of extensions).
Warning: Running Doesn’t Mean Working
The first extension I got running in VS 11 was Visual Studio Color Themes Editor. It got its menu in, and I can choose colour palettes and everything, but here is what I get if I choose anything other than "Default" palette:
Not very pleasant, ha?
Basically, this is a hack. It may work nicely like the one demoed here,, and it may not. The difference in Visual Studio is not just version number. There must be a lot of internal design and APIs and such that may affect how the plug-ins work.
So, try it and see
P.S. Please help me out by checking this offer, then look below for a small Thank You.
How did I learn that?
As a bonus for coming here, I'm giving away a free newsletter for web developers that you can sign up for from here.
It's not an anything-and-everything link list. It's thoughtfully collected picks of articles and tools, that focus on Angular 2, ASP.NET 5, and other fullstack developer goodies.