How to determine Team Project Uri from project folder

377 Views Asked by At

I'm making a c# application where the user provides a c++ project directory that is under source control on TFS 2012. I need to determine the Team Project Uri so that I can use the TFS API to modify labels on that c++ project.

The only thing I've found is to navigate to the $tf folder that is created and parse the localversion.tf1 file, but it's not easy to read in. Is there a better way to determine this?

Or perhaps a way to read the file using the Microsoft Team Foundation library?

1

There are 1 best solutions below

0
On BEST ANSWER

You'll have to use the VersionControlServer class from TFS Client Object Model.

You can find an example here.