The versioninfo.json configuration contains both FixedFileInfo (structured numeric components: Major, Minor, Patch, Build) and StringFileInfo (free-form strings).
When Build() is called, the tool synchronizes them:
- If
FixedFileInfo is set but StringFileInfo is empty, the string is generated (e.g., "2.0.0.0"). - If
StringFileInfo has a parseable version string but FixedFileInfo is all zeros, the numeric fields are populated from the string. - If both are set, neither is modified (a warning is logged if they do not match).
- If a
StringFileInfo version string cannot be parsed, a warning is logged.
Because of this, you only need to specify version information in one place (e.g., just FixedFileInfo).
{
"FixedFileInfo": {
"FileVersion": {
"Major": 2,
"Minor": 0,
"Patch": 0,
"Build": 0
},
"ProductVersion": {
"Major": 2,
"Minor": 0,
"Patch": 0,
"Build": 0
}
}
}