I am working with the TFS2017 build process and am having issues with versioning the assemblies. I am using the dotnet build task, command is set to build
, Projects is set to **/*.sln
and arguments set to --configuration $(BuildConfiguration) /p:Version=$(Build.BuildNumber)
When looking at the TFS build log the right command is executed (see below)
"C:\Program Files\dotnet\dotnet.exe" build C:\_agent\_work\13\s\*nameofsolution*.sln --configuration Release /p:Version=1100.1.0.0005
However the version of the assembly (File Version and Product Version) show as 1.0.0.
In the csproj file there is no <Version>
element.
When I run the above generate command on the build server as the build agent user the assembly is versioned correctly. Is there something that I am missing in my csproj or as part of the solution properties?