扩展 Visual Studio/Team Foundation Server 2010

发布于 2025-01-04 17:39:01 字数 389 浏览 0 评论 0 原文

我正在尝试使用 VSPackage 为 Visual Studio 2010 创建一个工具窗口。我已经创建了所有这些。对于我的项目,我正在尝试访问 TFS 2010。例如,在处理项目时,某些文件可能会被检出,并且我对它们进行了更改,但我不一定想稍后检入。而不是通过 tfs 并选择我不想签入的所有文件(可能非常耗时),我希望能够过滤文件/将文件添加到“不签入”类型的列表中。所以基本上如果添加一个文件/过滤器以防止文件签入。我想要某种方式连接到有人想要签入的事件,插件/工具窗口可以自动取消选择过滤器/文件中的所有文件我已经设置的列表。我很清楚自己想做什么。我只需要一个好的起点来与 tfs 进行通信。所以我知道我需要能够访问我的收藏,并且当有人想要签入文件时也收到通知/这样我就可以修改我不想签入的文件的签入状态。希望我做了对这一切都有感觉。任何帮助将不胜感激!

I am attempting to use a VSPackage to create a Tool window for visual studio 2010. I have all of that created. 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. 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. 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. 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!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫烠⑼条掵仅有一顆心 2025-01-11 17:39:01

TeamFoundationServerExt 类 (http://msdn.microsoft.com /en-us/library/microsoft.visualstudio.teamfoundation.teamfoundationserverext.aspx)可能会提供您正在寻找的内容。

它包含 Visual Studio 内当前的 TFS 上下文 - 例如。您在团队资源管理器中连接到的团队项目。

从那里您可以获得 VersionControlServer 对象,该对象又公开签入相关事件。更多详细信息请参见 http://blogs.msdn.com/b/buckh/archive/2012/01/25/how-to-get-the-tfs-objects-used-in-our-own-ui-集成.aspx

上面提到的博客文章有一个很好的代码示例。

最后一件事:如果您尝试过滤掉的文件可以通过正则表达式定义,则可以使用禁止模式签入策略,该策略是 Team Foundation Server 电动工具

The class TeamFoundationServerExt (http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.teamfoundation.teamfoundationserverext.aspx) may provide what you're looking for.

It contains the current TFS context inside Visual Studio - eg. 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. 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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文