Specify private extension gallery programmatically in Visual Studio 2012

One of the newest features in VS 2012 is the ability to create Private Extension Galleries , which allows you to create your own extension repositories rather than having to publish them to the world (internal company tools, etc.). I successfully created it as described on the MSDN blog I linked to, but I'm wondering if anyone knows of the ability to programmatically set gallery details - name and URL, and then "Apply" - so that each person, who wants to access it does not have to manually enter information.

I have looked in the registry to see if I can install the key, and I think it is possible, but not entirely trivial. Anyone have any insight?

+3


source to share


2 answers


The registry keys for the installation are documented under http://msdn.microsoft.com/en-us/library/hh266735.aspx . $ RootPath $ indicates the path, for example HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0

on the user's machine. In a minimal case, you can write a small tool that simply installs these registry keys.



If you want to be really fancy, you can take this example .pkgdef and paste it into .vsix. Then installing this extension will register its own gallery of the extension. A bit of meta, but it might be useful.

+4


source


I'm going to mark Jason's answer as accepted because he pointed me out on how to do it right, which was my final question. However, I want to add another solution that works if that's all you need:

If you manually add your personal information to the gallery in Visual Studio, your registry key will be generated for you. Switch to:



HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\ExtensionManager\Repositories\[Dynamic Guid]

and export this key to a regular REG file. Then you can create a simple script package to install the key for you on other computers, or just use the REG file to install it.

+3


source







All Articles