Running VS2010 Gallery Extensions In VS2011 Developer Preview, Meet Git Source Control Provider

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.

http://www.visualstudiogallery.com

Now, in the "FIND" box, try to reach what you want, for this exercise we’ll look for Git Source Control Provider.

image

Click on the plugin you want in the result:

image

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

image

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:

image

Right click "extension.vsixmanifest" and choose Open With->Notepad

image

It should look like (highlight is mine):

image

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">.

<VisualStudio Version="11.0">
  <Edition>Ultimate</Edition>
  <Edition>Premium</Edition>
  <Edition>Pro</Edition>
  <Edition>IntegratedShell</Edition>
</VisualStudio>

So, the file should look like:

image

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.

image

By default, this creates a new "GitSccProvider.zip" file in the same folder,. Rename that file to "GitSccProvider.vsix" (accept Windows warning, say yes!).

image

Run the "GitSccProvider.vsix". It may take a short while to open, but then you should see something like:

image

(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:

image

 

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).

image

 

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:

image

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 Smile

Share With Friends:

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 (4.x/MVC5 and Core), and other fullstack developer goodies.

Take it for a test ride, and you may unsubscribe any time.

You might also want to support me by checking these out [Thanks]: