Search code examples
buildtfstfs-sdk

How to query a TFS build from its URI using the api?


How do I get the IBuildDetail object from TFS using the the builds URI?

e.g. the URI is vstfs:///Build/Build/1546


Solution

  • Use the GetBuild() method on the build server class. It takes a Uri as a parameter.

    var buildDetail= buildServer.GetBuild(new Uri(builduri));