Skip to content

Commit 44a1cfe

Browse files
author
Oren Novotny
committed
doc update
1 parent eb714c7 commit 44a1cfe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/more-info/build-server-setup/tfs-build-vnext.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ From a TFS build definition, select "Add a Step" and then in the Build category,
3030

3131
If you want the GitVersionTask to update AssemblyInfo files, check the box in the task configuration. For advanced usage, you can pass additional options to the GitVersion exe in the Additional arguments section.
3232

33-
The VSO build step updates the build number automatically to the GitVersion number.
33+
The VSO build step can update your build number with GitVersion variables. See below for details.
34+
3435

3536
## Running inside TFS
3637
### Using the GitVersion Variables
@@ -43,6 +44,11 @@ To use GitVersion's variables in the build name, just add them in the form `$(GI
4344
`/output buildserver` and it will replace those variables with the calculated version.
4445
The TFS GitVersion Build Step (above) handles this too, so if you're already using that, there's nothing extra to configure.
4546

47+
If you currently use `$(rev:.r)` in your build number, that won't work correctly if you
48+
use GitVersion variables as well due to the delayed expansion of the GitVersion vars. Instead,
49+
You might be able to use `$(GitVersion_BuildMetaData)` to achieve a similar result.
50+
See [Variables](/more-info/variables/) for more info on the variables.
51+
4652

4753
#### Known limitations
4854
* Due to [current limitations in TFS2015 On-Prem](https://github.com/Microsoft/vso-agent-tasks/issues/380) it's currently not possible to automatically set the build version in TFS2015 On-Prem. Instead a warning similar to `##[warning]Unable to process logging event:##vso[build.updatebuildnumber 1.0.0-unstable.1` is logged.

0 commit comments

Comments
 (0)