Team Foundation Latest Version Number - Wrong changeset id?

 Hello,

I am trying to get the latest changeset id for one of my projects using the "Team Foundation Latest Version Number" action. However I keep getting the latest changeset id for for the whole server. 

This is how I have set up the taks:

1. Map tfs working folder

servername is set to my tfs server (http:tfs:8080)

workspace is set (ixxtfs2)

and remote folder is set to my project $/CAR001

local working folder: %SrcDir%

2. Team foundation latest version number

Working folder: I have tried both "use default" and user %SrcDir% but I get no difference.

The command returns changeset id 1571 which is the latest for $/, but I want the latest for $/CAR001 which is 1554.

What am I doing wrong?

 Hi Andre,

We use the tf changeset command to get the version number - from my reading of the docs and some brief testing it doesn't appear to support filtering at the project level. The tf history command does seem to be project-aware, but its output is less deterministic and is hence harder to parse to extract the version number. If I can reliably parse the history output, I'll change the action to use it.

Cheers,

Ben

Hi again Andre,
I’ve changed the action to use tf history in the latest test build: https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_812.exe

Can you please download it and see if it addresses your issue?

Cheers,

Ben

 Hello again,

First of all, I'm impressed and pleased with the fast response, thank you!

Unfortunatly I can't get it right just yet, the command executed by the get latest version number is "history * /recursive /noprompt". This command fails on my machine. However "history $/CAR001 /recursive /noprompt" does not, but I can't find any setting to change the parameters.

 

See the attached picture.

 

[Attachment unavailable]</span

Hi Andre,
I tested with the 2010 version of tf.exe, and it looks like you’re using 2008. There may have been a change between 2008 and 2010. What output do you get if you manually run tf.exe /history * /noprompt /recursive from the command line in your src directory?

Cheers,
Ben

Hello again,

It seems like I have some other error, but I can't really figure out what (I'm not the best friend with TFS). The tf command seems to look for a workspace called "Ixxtfs2" (like the computer name). Even if the only existing workspace is Nova-Release which is mapped to the correct source folder.

003_002_001_Capture.PNG.jpg

Hi Andre,
Unfortunately the forum software has re-sized your image and I can’t read the command output. Can you please either add a screenshot of just the CMD window, or cut and paste the text?

FYI in your first post you said you had set the workspace to ixxtfs2.

Ben

Here it goes again...sorry.

Yes, previsouly I had IXXTFS2 as a default workspace set up on the machine. But I had to change it so now I create a workspace in my build script (Productname-Buildtype) and delete it when I'm done.

I hope this picture is a bit clearer, otherwise here is the output:

Here is the command: d:\BuildServerWorkDir\NOVA-Release\src>tf history * /noprompt /recursive"

Output: "TF14061: The workspace IXXTFS2;IXX\andrej.admin does not exist"

Notice that in the dialog behind, you can see that there is no workspace ixxtfs2 anymore so why tfs searches for it is a mystery for me.

Capture2.PNG.jpg

I don't know exactly what I've done but after some restarting and using your latest build the build numbers now seem correct. If i figure out what was wrong I will post it here.

 

But thanks for you help and the extra build!

Glad it’s working now. Please let us know if you run into any more issues.

Cheers,

Ben