tags:

views:

428

answers:

1

Is there a way to programatically determine the current workspace of the open sln/proj in visual studio using the TFS API? I've seen how the VersionControlServer can retreive all of the known workspaces, but is there anything I can use to tie that to what the user currently has (or doesn't have) open?

+2  A: 

If you can determine the physical path of the solution or project file, then you can query that file in TFS and you should see which workspace has been mapped to that local file location.

Bernhard Hofmann
Ah. I didn't realize that the mapped path for a workspace had to be unique, but it makes sense. Awesome, thanks!
JPero