
MSBuild properties
Inputs
Input properties are passed to the Git2SemVer MSBuild task.
A property may be defined within a csproj
file or on a command line like:
dotnet build -p:Git2SemVer_UpdateHostBuildLabel=true
Or, in the csproj
file like:
<PropertyGroup>
:
<Git2SemVer_UpdateHostBuildLabel>true</Git2SemVer_UpdateHostBuildLabel>
:
</PropertyGroup>
The MSBuild input poperties are:
Outputs
Git2SemVer's MSBuild task outputs version information to MSBuild properties. Some of these properties are standard MSBuild properties used by the compiler. The custom properties are provided for third party MSBuild task use.
Standard versioning properties
MSBuild standard versioning properties set are:
- AssemblyVersion
- FileVersion
- InformationalVersion
- PackageVersion
- Version
- VersionPrefix
- VersionSuffix
More information can be found here.
Custom properties
Custom properties set for use by other scripts are:
Property
|
Description
|
Git2SemVer_CommitsSinceLastRelease
|
The count of commits from head to the last release used for versioning. Also known as "commit height". Commit height is very widely used but not reliable. Consider using Git2SemVer's build number for better traceability. Not used by Git2SemVer. |
Git2SemVer_Output1
|
An output value that may be set by C# script (context.Outputs.Output1). Default is an empty string. Not used by Git2SemVer. |
Git2SemVer_Output2
|
An output value that may be set by C# script (context.Outputs.Output1). Default is an empty string. Not used by Git2SemVer. |