为 TFS 源代码管理资源管理器上下文菜单扩展创建 VSIX 包 [英] Creating VSIX package for TFS Source control explorer context menu extension

查看:34
本文介绍了为 TFS 源代码管理资源管理器上下文菜单扩展创建 VSIX 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建 VSIX 包以在单击分支时扩展 TFS 2012 源代码管理右键单击上下文菜单的功能.我不想使用插件.这必须是其他开发人员可以直接安装的软件包.安装扩展后,自定义菜单项需要出现在源代码管理资源管理器上下文菜单中.我无法获得此要求的任何样本或无法获得适当的文档来源.我发现的示例之一是TFS 社区分支工具",这是我正在寻找的类似功能,但我无法获得它的源代码.

I am trying to create VSIX package to extend functionality of TFS 2012 source control right click context menu when clicking on branch. I don't want to use Add-in. this has to be package which other developers can directly install. The customized menu items need to appear in the source control explorer contextual menu after they install the extension. I am not able to get any sample for this requirement or not able to get proper documentation source. One of sample I found is "TFS community branch tool", which is kind of similar functionality I am looking for, but I am not able to get the source code of it.

感谢您的帮助.

推荐答案

我假设您熟悉 .vsct 文件、command/menu/groups Guids/Id 内容(所有这些都记录在 MSDN 中).因此,问题是源代码管理资源管理器的上下文菜单中的组的 Guid/Id 是哪个.

I assume that you are familiar with the .vsct file, command/menu/groups Guids/Id stuff (all this is documented in MSDN). So, the question would be which is the Guid/Id of the group inside the context menu of Source Control Explorer.

猜测您可能希望在文件上下文菜单的获取最新版本"菜单项下方使用您的命令,代码将是:

Guessing that you may want your command below the "Get Latest Version" menu entry of the context menu of a file, the code would be:

 <Commands package="guidVSMyPackagePkg">

     <Buttons>
      <Button guid="guidVSMyPackageCmdSet" id="cmdidMyCommand" priority="0x0100" type="Button">
         <Parent guid="guidSourceControlExplorerMenuGroup" id="SourceControlExplorerMenuGroupId"/>
        <Strings>
          <ButtonText>My Command</ButtonText>
        </Strings>
      </Button>
    </Buttons>
  </Commands>

  <Symbols>
    <GuidSymbol name="guidVSMyPackagePkg" value="{...}" />

    <GuidSymbol name="guidVSMyPackageCmdSet" value="{...}">
      <IDSymbol name="cmdidMyCommand" value="0x0100" />
    </GuidSymbol>

     <GuidSymbol name="guidSourceControlExplorerMenuGroup" value="{ffe1131c-8ea1-4d05-9728-34ad4611bda9}">
         <IDSymbol name="SourceControlExplorerMenuGroupId" value="0x1111" />
     </GuidSymbol>
   </Symbols>

这篇关于为 TFS 源代码管理资源管理器上下文菜单扩展创建 VSIX 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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