GetVersion Property

Jun 16, 2011 at 3:56 AM

I have created a custom property for GetVersion and set a default value to a specific changeset.  When I queue a new buddy build and I clear out the value of the custom property, the build does not build against the most recent changeset as I would have hoped it would.  Instead, I am not sure what it is building against because the build actually fails.  I would appreciate any help anybody is able to provide.



Jun 16, 2011 at 11:21 AM

The Buddy Build Extensions script actually uses the value of $(GetVersion) in order to resync after unshelving. I think you are having a problem when you clear the value of $(GetVersion) since that would cause the tf command to fail since the command becomes like this "tf get . /version: /recursive /noprompt" which is invalid and results in an error.

BTW, you dit not mention what error message you are getting. I would suggest that if you want to get latest sources, you should probably set $(GetVersion) to "T" rather than clear it.

If you want to confirm what version is the tip version for your build, you can look for the following lines at the top of your BuildLog.txt file:

         Get TeamFoundationServerUrl="http://your-tfs-host:8080/" BuildUri="vstfs:///Build/Build/12345" Force=True Overwrite=False PopulateOutput=False Preview=False Recursive=True Version="T" Workspace="build-workspace-name"

         SetBuildProperties TeamFoundationServerUrl="http://your-tfs-host:8080/" BuildUri="vstfs:///Build/Build/12345" CompilationStatus="Unknown" SourceGetVersion="T" Status="0" TestStatus="Unknown"

Look for the value of the Version attribute.

Jun 17, 2011 at 5:07 AM

Mojallou, thank you for your response.  I will give this a try!