在 Visual Studio 2012 中以编程方式指定私有扩展库 [英] Programmatically specify Private Extension Gallery in Visual Studio 2012

查看:25
本文介绍了在 Visual Studio 2012 中以编程方式指定私有扩展库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

VS 2012 的最新功能之一是能够创建 私人扩展库,允许您构建自己的扩展存储库,而不必将它们发布到全世界(公司内部工具等).我已经按照我引用的 MSDN 博客中的描述成功创建了一个,但我想知道是否有人知道一种以编程方式设置画廊详细信息的方法 - 名称和 URL,然后应用"它 - 以便每个想要访问它的人不必手动输入信息.

One of the newest features in VS 2012 is the ability to create Private Extension Galleries, which allow you to build your own extension repositories and not have to publish them to the world (internal company tools, etc.). I've successfully created one as described in the MSDN blog I referenced, but I'm wondering if anyone knows of a way to programmatically set the details of the gallery - the name and URL, and then "Apply" it - so that each person who wants to access it doesn't have to manually enter in the info.

我查看了注册表以查看是否可以安装密钥,我认为这是可能的,但并非微不足道.任何人有任何见解?

I looked in the registry to see if I could install a key, and I think it's possible but not exactly trivial. Anyone have any insight?

推荐答案

要设置的注册表项记录在 http://msdn.microsoft.com/en-us/library/hh266735.aspx.$RootPath$ 将指示用户计算机上类似 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0 的路径.至少,您可以编写一个小工具来设置这些注册表项.

The registry keys to set are documented under http://msdn.microsoft.com/en-us/library/hh266735.aspx. $RootPath$ would indicate a path like HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0 on the user's machine. Minimally, you could write a little tool that just sets those registry keys.

如果你真的很喜欢,你可以拿那个 .pkgdef 示例并将其粘贴到 .vsix 中.然后,安装该扩展程序将注册私有扩展程序库.有点元,但这可能会很有用.

If you want to be really fancy, you could take that .pkgdef example and stick that inside a .vsix. Then, installing that extension would register the private extension gallery. A bit meta, but that could prove useful.

这篇关于在 Visual Studio 2012 中以编程方式指定私有扩展库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆