tags:

views:

324

answers:

0

Hi All,

Using TFS SDK, how can one get the latest version number of a certain file?

Right now I'm doing this:

VersionControlServer vcs = (VersionControlServer)_tfsServer.GetService(typeof(VersionControlServer));
int LatestVersion = vcs.GetItem(change.Item.ServerItem).ChangesetId; //Get Latest Version of this item

However, this approach takes too long if I have lots of files to check. (From my test, it takes about a second for each item).

Is there any other way to get the latest version number of a file (server item) from TFS?

Thanks,