Nam G VU
Nam G VU

Reputation: 35384

How to get path to file path in a Workspace by C# in a customized activity of TFS 2012 build process template?

I'm writing a customized activity for TFS build process workflow, e.g. guideline here.

In my C# CodeActivity .Execute() method, I want to get path to file and/or folder in a Workspace I tried google and found ConvertWorkspaceItem here but I don't know how to run it and discussed here.

If you know how to, please share.

Upvotes: 0

Views: 1195

Answers (1)

jessehouwing
jessehouwing

Reputation: 114741

The ConvertWorkspaceItem is an activity. In your custom code activity, you can either create an instance of this activity, set the required parameters and call the Execute() method. Or you can use the VersionControlServer.TryGetWorkspace and which returns a Workspace object. Use Workspace.GetLocalItemForServerItem or the reverse Workspace.GetServerItemForLocalItem.

Upvotes: 1

Related Questions