Skip to content

Commit eca5ac8

Browse files
committed
Merge pull request #595 from pascalberger/TfsBuildVariableDocImprovement
Clarify documentation of variables in TFS build
2 parents e7a30cc + 8414ab7 commit eca5ac8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ If you want the GitVersionTask to update AssemblyInfo files, check the box in th
3030

3131
## Running inside Visual Studio Online
3232
### Using the GitVersion Variables
33-
GitVersion writes build parameters into VSO, so they will automatically be passed to your build scripts to use. It also writes GITVERSION_* environment variables that are available for any subsequent build step.
34-
We output the individual values of the GitVersion version as the build parameter: `GitVersion.*` (Eg: `GitVersion.Major`) if you need access to them in your build script.
33+
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.
3534
See [Variables](/more-info/variables/) for an overview of available variables.
3635

37-
Note that due to [current limitations in VSO](https://github.com/Microsoft/vso-agent-tasks/issues/380) it's currently not possible to set the build version inside of VSO to one of the GITVERSION_* variables.
36+
#### Known limitations
37+
* Due to a bug in VSO 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.
38+
As a workaround environment variables can be used in custom scripts.
39+
* Due to [current limitations in VSO](https://github.com/Microsoft/vso-agent-tasks/issues/380) it's currently not possible to set the build version inside of VSO to one of the `GITVERSION_*` variables.
3840

3941
## Create a NuGet package in VSO
4042
If you use a Command Line task to build your NuPkg, use `%GITVERSION_NUGETVERSION%` as the version parameter: `nuget.exe pack path\to\my.nuspec -version %GITVERSION_NUGETVERSION%`

0 commit comments

Comments
 (0)