coop_d
coop_d

Reputation: 67

How to determine Team Project Uri from project folder

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?

Upvotes: 0

Views: 380

Answers (1)

ds19
ds19

Reputation: 3165

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

You can find an example here.

Upvotes: 2

Related Questions