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: https://msdn.microsoft.com/en-us/library/hh266746.aspx

https://msdn.microsoft.com/en-us/library/hh266717.aspx

Moreover, if you read this article, you will think that the only options you have available to you are an Atom Feed or SharePoint: https://msdn.microsoft.com/en-us/library/hh266735.aspx

But, thanks to CodePlex, you can download an MVC Web Application which provides this support for you!  http://inmetavsgallery.codeplex.com/

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: http://blog.ehn.nu/2013/12/inmeta-visual-studio-extension-gallery-version-2-0/

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