Quantcast
Channel: Team Foundation Server - General forum
Viewing all articles
Browse latest Browse all 6687

How to get builddetail in TFS 2013

$
0
0

My purpose is to get the latest changeset during TFS build and then use this changeset num to update assembly version.

In TFS 2012, i use BuildDetail.BuildDefinition.Workspace.Mappings to get workspace mappings then use the method below to get latest changeset:

private string GetLatestChangesetNum(Workspace workspace, List<IWorkspaceMapping> workspaceMappings)
        {
            var changesets =
                workspace.VersionControlServer.QueryHistory(workspaceMappings[0].ServerItem, VersionSpec.Latest, 0,
                    RecursionType.Full, null, null, null, 1, true, false).Cast<Changeset>();
            return changesets.First().ChangesetId.ToString();

        }

The problem is when i migrate to TFS build 2013, i found BuildDetail is not existed. So any other API could help this?


Viewing all articles
Browse latest Browse all 6687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>