简体   繁体   English

扩展Visual Studio / Team Foundation Server 2010

[英]Extending Visual Studio / Team Foundation Server 2010

I am attempting to use a VSPackage to create a Tool window for visual studio 2010. I have all of that created. 我正在尝试使用VSPackage为Visual Studio 2010创建“工具”窗口。所有这些都已创建。 For my project I am attempting to access TFS 2010. For example when working on a project some files might get checked out and I make changes on them that I don't necessarily want to check in later. 对于我的项目,我试图访问TFS2010。例如,当在一个项目上工作时,某些文件可能会被检出,而我对它们进行了更改,因此我不必稍后再检入。 Rather that going through tfs and selecting all of the files I don't want to check in(can be very time consuming) I would like to be able to filter files / add files to a "do not check in" type of list. 而是通过tfs并选择所有我不想检入的文件(可能非常耗时),我希望能够过滤文件/将文件添加到“不检入”类型的列表中。 So basically If a add a file / filter for files to not check in. I want some way of connecting to the event of when someone wants to check in, the plugin / tool window can automatically deselect all of the files in the filter/ file list that I have set up. 因此,基本上,如果添加了一个文件/过滤器以使文件无法签入。我想通过某种方式连接到有人要签入的事件,那么插件/工具窗口可以自动取消选择过滤器/文件中的所有文件我设置的清单。 I have a good idea of what I want to do. 我对自己想做的事有个好主意。 I just need a good place to start in order to communicate with tfs. 我只需要一个好地方开始与tfs交流。 So I know I would need to be able to access my collections and also be notified of when someone wants to check in files/ that way I can modify the check in status of the file that I do not want to check in. Hopefully I made sense with all of that. 因此,我知道我需要能够访问我的收藏集,并且还可以在有人要检入文件的时候得到通知,这样我可以修改不想检入的文件的检入状态。希望我做了所有这些意义。 Any help would be MUCH appreciated!! 任何帮助将非常感激!!

The class TeamFoundationServerExt ( http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.teamfoundation.teamfoundationserverext.aspx ) may provide what you're looking for. 类TeamFoundationServerExt( http://msdn.microsoft.com/zh-cn/library/microsoft.visualstudio.teamfoundation.teamfoundationserverext.aspx )可能会提供您想要的内容。

It contains the current TFS context inside Visual Studio - eg. 它包含Visual Studio中的当前TFS上下文-例如。 the team project to which you're connected in Team Explorer. 在团队资源管理器中连接到的团队项目。

From there you can get the VersionControlServer object, which in turn exposes check-in related events. 从那里,您可以获取VersionControlServer对象,该对象继而公开与签入相关的事件。 More details in http://blogs.msdn.com/b/buckh/archive/2012/01/25/how-to-get-the-tfs-objects-used-in-our-own-ui-integration.aspx . 有关更多详细信息,请参见http://blogs.msdn.com/b/buckh/archive/2012/01/25/how-to-get-the-tfs-objects-used-in-our-own-ui-integration.aspx

The blog post mentioned above has a nice code sample. 上面提到的博客文章有一个不错的代码示例。

One last thing: If the files you're trying to filter out can be defined via regular expressions, you can use the Forbidden Patterns check-in policy, part of the Team Foundation Server Power Tools . 最后一件事:如果可以通过正则表达式定义要过滤的文件,则可以使用Team Foundation Server Power Tools的一部分禁止模式检入策略。

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

相关问题 Microsoft Team Foundation Server 2010 - Microsoft Team Foundation Server 2010 Team Foundation Server 2010 API - Team Foundation Server 2010 API 使用C#连接到Visual Studio 2015中的Team Foundation Server? - Connecting to a Team Foundation Server in Visual Studio 2015 with C#? 如何在Visual Studio中的Team Server Foundation中脱机? - How to go offline in Team Server Foundation in visual studio? Team Foundation Server 2010:使用外部库进行构建 - Team Foundation Server 2010: Build with external library 如何通过C#代码将Visual Studio连接到Team Foundation Server Team Project - How to connect Visual Studio to Team Foundation Server Team Project from C# code Team Foundation Server 2010中的依赖关系管理/团队项目 - Dependency Management/Team Projects in Team Foundation Server 2010 如何使用C#从TFS(Team Foundation Server)中获取/复制文件(Visual Studio) - How to fetch/copy files from a TFS (Team Foundation Server) with C# (Visual Studio) 通过REST API概述(用于Visual Studio Team Services和Team Foundation Server)从Microsoft vso WorkItem访问注释 - Accessing the comments from a microsoft vso WorkItem via REST API Overview for Visual Studio Team Services and Team Foundation Server 无法打破Team Foundation Server 2010 Web Access中的模拟 - Unable to break impersonation in Team Foundation Server 2010 Web Access
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM