Thursday, August 11, 2016

Setting up a Private Extension Gallery

If you use Visual Studio Extensions extensively, then you are probably very familiar with the Visual Studio Gallery, but what if you want to set up a Private Extension Gallery just for use with your internal development team?

Well, there is a solution for that as well!

If you read this article from MSDN, you will think that you need to set up your own Atom feed in order to accomplish this:

Moreover, if you read this article, you will think that the only options you have available to you are an Atom Feed or SharePoint:

But, thanks to CodePlex, you can download an MVC Web Application which provides this support for you!

You will need to install WebDeploy so that you can deploy this Web Application to your IIS site.  But, you may find that it does not work even after installing the Web Application into IIS!  This is because of a registry key that needs to be imported before Visual Studio will recognize the WCF Service for hosting the Extensions as documented here:

The key value for this is the "VSGallery" value for the Protocol Registry Subkey.

Unfortunately, the registry key that is provided on the CodePlex site is a bit outdated and does not work for later versions of Visual Studio such as Visual Studio 2015.

I have written a convenient PowerShell script to handle newer versions of Visual Studio:

If you prefer to add the Private Gallery directly through Visual Studio, you can do that as well as follows:

You will then end up with something like this in the Registry:

Now once you have done that, you simply have to run the following PowerShell script to update the Protocol Registry Subkey so that it is updated to "VSGallery" and provide the appropriate matching GUID:
Alternatively, if you are only planning to have a single Private Extension Gallery, you can use this script to dynamically retrieve it and update the Protocol for you:

No comments:

Post a Comment