Liero
Liero

Reputation: 27348

How to programatically get version of local copy

Is there a way to find out version (changesetid) of local file (workspace version)?

In visual studio I can compare file with workspace version so there must be a way to find out what is current workspace version.

Upvotes: 0

Views: 62

Answers (1)

MichalMa
MichalMa

Reputation: 1230

There are two methods that come to mind https://msdn.microsoft.com/en-us/library/microsoft.teamfoundation.versioncontrol.client.workspace.getlocalversions(v=vs.120).aspx

And https://msdn.microsoft.com/en-us/library/hh723884(v=vs.120).aspx

The former gives you only version and is super fast. The latter returns much more info. They are else exposed through cmd, tf localversions and tf items i think

Upvotes: 1

Related Questions