Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get current TFS connection in a Visual Studio addin

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.

like image 711
Robaticus Avatar asked Oct 26 '22 10:10

Robaticus


1 Answers

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

See this documentation on MSDN for more details.

like image 98
Aghilas Yakoub Avatar answered Nov 15 '22 11:11

Aghilas Yakoub