简体   繁体   English

向Visual Studio 2015s团队资源管理器添加新部分

[英]Adding new sections to Visual studio 2015s team explorer

I'm trying to write an extension for visual studio 2015 that adds new UI features to the team explorer window. 我正在尝试编写Visual Studio 2015的扩展程序,该扩展程序将新的UI功能添加到团队资源管理器窗口。

Visual Studios 2013 and 2012 had a standard way of doing this (Implementing the ITeamExplorerSection interface), which no longer applies to 2015 from what I can tell. Visual Studios 2013和2012具有执行此操作的标准方法(实现ITeamExplorerSection接口),据我所知,该方法不再适用于2015。

What, if any, is the new way of extending the team explorer in VS2015? 如果有的话,在VS2015中扩展团队资源管理器的新方法是什么?

I myself have been looking for documentation on adding a team explorer extension, I found some documentation here , however it is targeted to 2013. The main differences are the first part of the tutorial using the wizards as they have changed, but everything in there needs to be done. 我本人一直在寻找有关添加团队资源管理器扩展的文档,我在这里找到了一些文档,但是针对的是2013年。主要区别是本教程的第一部分使用了已更改的向导,但是其中的所有内容都需要要做。

Also do yourself a favor and download the VSSDK2015 instead of using nuget, trust me on this one, it created no end of issues for me, probably from my understanding. 也请帮自己一个忙,下载VSSDK2015而不是使用nuget,请相信我,这可能对我来说没有问题,对我而言没有任何问题。

The next issue you will run into is finding the dll's you'll need to reference regarding Team Explorer, just do a search through your visual studio directory. 您将遇到的下一个问题是找到与Team Explorer有关的dll,您只需在Visual Studio目录中进行搜索即可。 Also I believe that there isn't a 2015 specific client for TE, so use the 2013 version. 我也相信没有针对TE的2015年特定客户端,因此请使用2013年版本。

Another issue I ran into is that when you create the vsix project you will need to run VS as admin, because it wants to sign the vsix. 我遇到的另一个问题是,当您创建vsix项目时,您将需要以管理员身份运行VS,因为它想对vsix进行签名。 After creating the project you can be a user. 创建项目后,您可以成为用户。 I just "unsigned" it too at this point also. 此时,我也只是“未签名”。

Your going to add a Page and then a section, in the page you load your section. 您要在加载页面的页面中添加一个页面,然后添加一个部分。 That's the gist of it. 这就是要旨。

Using the TeamExplorer.Common project from the GitFlow project really helps. 使用GitFlow项目中的TeamExplorer.Common项目确实有帮助。

Edit: A more direct answer would be to decorate a class that implements ITeamExplorerSection with: [TeamExplorerSection(section_guid, page_guid, importance)] 编辑:更直接的答案是用以下方法来装饰实现ITeamExplorerSection的类:[TeamExplorerSection(section_guid,page_guid,重要)]

where: 哪里:

  • section_guid is a guid defined in your package section_guid是您的软件包中定义的guid
  • page_guid is the guid to the page you want to show the section on page_guid是要在其上显示该部分的页面的导航
  • importance is a number that gives you some control over where its shown on the page, 100, 200... any number will do, lower numbers are higher on the page 重要性是一个数字,它使您可以控制其在页面上的显示位置,分别为100、200 ...任意数字都可以,较低的数字在页面上较高

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM