Version Object
The version object Version is used by the version property of the Build object. It provides access to each component the version string
Properties
Name |
Description |
Type |
Usage Example |
Default |
A reference object for decomposing a version string using the default versioning format |
DotNet |
$Build.Version.Default |
DotNet |
A reference object for decomposing a version string using the .Net versioning format |
DotNet |
$Build.Version.DotNet |
Semantic |
A reference object for decomposing a version string using the Semantic versioning format |
Semantic |
$Build.Version.Semantic |
DotNet Properties
Name |
Description |
Type |
Usage Example (given "1.2.3.4") |
|
Build |
The build component of the version number |
Integer |
$Build.Version.Default.Build$ |
3 |
Major |
The major component of the version number |
Integer |
$Build.Version.Default.Major$ |
1 |
Minor |
The minor component of the version number |
Integer |
$Build.Version.Default.Minor$ |
2 |
Revision |
The revision component of the version number |
Integer |
$Build.Version.Default.Revision$ |
4 |
Semantic Properties
Name |
Description |
Type |
Usage Example (given "1.2.1287-beta+meta") |
|
IsPrerelease |
True if pre-release labels exist for the version |
Boolean |
$Build.Version.Semantic.IsPrerelease$ |
True |
HasMetaData |
True if metadata exists for the version |
Boolean |
$Build.Version.Semantic.IsPrerelease$ |
True |
Major |
The major component of the version number. |
Integer |
$Build.Version.Semantic.Major$ |
1 |
MetaData |
The metadata string after the plus at the end of the version number |
String |
$Build.Version.Semantic.MetaData$ |
"meta" |
Minor |
The minor component of the version number |
Integer |
$Build.Version.Semantic.Minor$ |
2 |
Patch |
The patch component of the version number |
Integer |
$Build.Version.Semantic.Revision$ |
1287 |
Release |
The full pre-release label for the version |
String |
$Build.Version.Semantic.Revision$ |
"beta" |