Determining the TFS server
I am attempting to create an application that requires a TFS server URL.
The only way I can find is to open a .sln file that is under source control and look at the "SccTeamFoundationServer" attribute. I'm sure there must be a way to get the server from Visual Studio, but I'm not sure how to do that in c#.
Any help would be grea开发者_运维技巧tly appreciated, thanks.
Taken from comments in Question.
I think the way to go is VersionControlExplorerItem.SourceServerPath and this 2005 blog post shows how to use it. blogs.msdn.com/b/edhintz/archive/2006/02/03/524312.aspx. theres a few bits on using it with 2010 which looks promising.
If you want to do it in a c# program, I think you are doing the correct way, there is no other.
精彩评论