You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/more-info/build-server-setup/tfs-build-vnext.md
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ See [MSBuild Task](/usage/#msbuild-task) for further instructions how to use the
14
14
3. Set the Tool parameter to `<pathToGitVersion>\GitVersion.exe`.
15
15
4. Set the Arguments parameter to `/output buildserver /nofetch`.
16
16
5. If you want the GitVersionTask to update AssemblyInfo files add `updateAssemblyInfo true` to the Arguments parameter.
17
+
6. If you want to update the build number you need to send a [logging command](https://github.com/Microsoft/vso-agent-tasks/blob/master/docs/authoring/commands.md) to TFS.
17
18
18
19
### Using the custom GitVersion build step
19
20
#### Installing/updating the custom build step
@@ -29,13 +30,15 @@ From a TFS build definition, select "Add a Step" and then in the Build category,
29
30
30
31
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.
31
32
33
+
The VSO build step updates the build number automatically to the GitVersion number.
34
+
32
35
## Running inside TFS
33
36
### Using the GitVersion Variables
34
37
GitVersion passes variables in the form of `GitVersion.*` (Eg: `GitVersion.Major`) to TFS Build and also writes `GITVERSION_*` (Eg: `GITVERSION_MAJOR`) environment variables that are available for any subsequent build step.
35
38
See [Variables](/more-info/variables/) for an overview of available variables.
36
39
37
40
#### Known limitations
38
-
* Due to [current limitations in TFS](https://github.com/Microsoft/vso-agent-tasks/issues/380) it's currently not possible to automatically set the TFS build name to the version detected by GitVersion.
41
+
* 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.
39
42
* Due to a know limitation in TFS 2015 On-Prem it's currently not possible to use variables added during build in inputs of subsequent build tasks, since the variables are processed at the beginning of the build.
40
43
As a workaround environment variables can be used in custom scripts.
0 commit comments