We have a batch-based buildprocess and we are using MSBuild only for compiling our project-files from visual studio. We also have integrated wix into our build-process. To set the version of our software we specify in the main-build-script some environment variables, that we use during the build-process. My problem is, that i have to set the FileVersion of the Assembly (AssemblyFileVersion) in my assembly-informations. Is there a way to give the MSBuild-call a property with the version to set? Like this (this doesn't work):
%dotnetdir%msbuild.exe Viewer.csproj /property:Configuration=Release /property:Platform=AnyCPU /property:AssemblyFileVersion=%major%.%minor%.%build%
The resulting assembly should have the fileversion %major%.%minor%.%build%
.
It's pain for me to set the AssemblyFileVersion-setting in all projects. And a program which is doing this is against my philosphy (i don't want to change my source with automated processes). The version should be set through the build-script. It is not necessary that the AssemblyFileVersion is set in the AssemblyInfo.cs
Or is there a possibility with MSBuild to specify a xml-configuration-file which describes the assembly-informations?
Would be great if there are any advices.
greetings, thanks, Martin
The Version
and AssemblyInfo
tasks from the MSBuild Community Tasks project may help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With