在 Visual Studio 插件中获取当前的 TFS 连接 [英] Get current TFS connection in a Visual Studio addin

查看:44
本文介绍了在 Visual Studio 插件中获取当前的 TFS 连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 Visual Studio 2010 加载项,并且正在尝试弄清楚如何确定当前连接的 TFS 服务器.我猜我需要使用 DTE,但我脑子抽筋了,想知道从哪里获取信息.

I'm working on a Visual Studio 2010 add-in, and I'm trying to figure out how to determine the currently connected TFS server. I'm guessing I need to use DTE, but I'm having a brain cramp figuring out where to get the info.

推荐答案

我建议你查看 Microsoft.TeamFoundation.VersionControl.Client.Workstation.GetLocalWorkspaceInfo 方法,结果你有一个对象和访问 ServerUri 属性

I suggest you check out the Microsoft.TeamFoundation.VersionControl.Client.Workstation.GetLocalWorkspaceInfo method, in result you have an object and access ServerUri property

参见 有关详细信息,请参阅 MSDN 上的此文档.

这篇关于在 Visual Studio 插件中获取当前的 TFS 连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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