Skip to content

Commit 3ef4778

Browse files
committed
Added documentation
1 parent 1917e78 commit 3ef4778

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/input/docs/usage/msbuild.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,16 @@ For SDK-style projects, `UpdateVersionProperties` controls setting the default
258258
variables: `Version`, `VersionPrefix`, `VersionSuffix`, `PackageVersion`,
259259
`InformationalVersion`, `AssemblyVersion` and `FileVersion`.
260260

261+
## Extra properties
262+
263+
There are properties that correspont to certain
264+
[command line arguments](/docs/usage/cli/arguments) for GetVersion task.
265+
In particular, setting `GitVersion_NoFetchEnabled` to `true` disables `git fetch`
266+
during version calculation, setting `GitVersion_NoNormalizeEnabled` to `true` disables
267+
normalize step on a build server, setting `GitVersion_NoCacheEnabled` to `true`
268+
makes GetVersion ignore cache. All the rest command line arguments can be passed via
269+
`GitVersion_CommandLineArguments` variable.
270+
261271
## My Git repository requires authentication. What should I do?
262272

263273
Set the environment variables `GITVERSION_REMOTE_USERNAME` and

src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<GitVersion_NoNormalizeEnabled Condition="$(GitVersion_NoNormalizeEnabled) == ''">false</GitVersion_NoNormalizeEnabled>
1414
<GitVersion_NoCacheEnabled Condition="$(GitVersion_NoCacheEnabled) == ''">false</GitVersion_NoCacheEnabled>
1515

16-
<GitVersion_ToolArgments>$(GitVersion_CommandLineArgments) -output file -outputfile $(GitVersionOutputFile)</GitVersion_ToolArgments>
16+
<GitVersion_ToolArgments>$(GitVersion_CommandLineArguments) -output file -outputfile $(GitVersionOutputFile)</GitVersion_ToolArgments>
1717
<GitVersion_ToolArgments Condition=" '$(GitVersion_NoFetchEnabled)' == 'true' ">$(GitVersion_ToolArgments) -nofetch</GitVersion_ToolArgments>
1818
<GitVersion_ToolArgments Condition=" '$(GitVersion_NoNormalizeEnabled)' == 'true' ">$(GitVersion_ToolArgments) -nonormalize</GitVersion_ToolArgments>
1919
<GitVersion_ToolArgments Condition=" '$(GitVersion_NoCacheEnabled)' == 'true' ">$(GitVersion_ToolArgments) -nocache</GitVersion_ToolArgments>

0 commit comments

Comments
 (0)