2
votes

I seem to be running into issues with versioning in Jenkins using MSBuild.

I am using Change Assembly Version Plugin which successfully updates the AssemblyInfo.cs file in the workspace folder.

Using MSBuild on the server via CMD, MSBUILD ProjectSolution.sln successfully builds the solution, placing the files in bin/debug folder & the version of the executable is the version changed by the plugin. However, when i trigger the build in Jenkins, the build is successful and files are placed in bin/debug folder, but the version of the executable is the default version.

Help please ...

here is Jenkins configuration here is Jenkins configuration

here is project configuration enter image description here

1

1 Answers

1
votes

My mistake (obviously)

in the second screenshot of project configuration, i had to move the 'change assembly version' one level above, so it would occur before the MSBuild step.

However irrespective of this step, MSBuild should have atleast should have had previous assemblyinfo.cs version. strange.

project configuration should be like this enter image description here