Context
In our repo, we have a file called version.txt
that contains the major and minor version number: 0.7
.
I added a TeamCity build step with a powershell script that sets this parameter into a config parameter, based on this answer:
$version = Get-Content version.txt
Write-Host "##teamcity[setParameter name='UserMajorDotMinor' value='$version']"
The UserMajorDotMinor
parameter defaults to 0.6
on TeamCity.
I have a config parameter called %UserVersionNumber%
that is used to set the actual version number, which is defined as
%UserMajorDotMinor%.0.%system.build.number%
The Problem
While prints 0.7
in the TeamCity build log, but it doesn't seem to properly set the UserVersionNumber, because the number that the assembly patcher writes into the dll is still 0.6.0.xxxxx
.
What do I have to change so TeamCity will actually write the correct version number into the dlls?