设置的AssemblyFileVersion与MSBuild的呼叫? [英] Setting AssemblyFileVersion with MSBuild-call?
问题描述
我们有一批基于buildprocess和我们使用的MSBuild只为从Visual Studio编译我们的项目文件。我们也整合到维克斯我们的构建过程。要设置我们的软件的版本中,我们在主构建脚本指定一些环境变量,我们在搭建过程中使用。
我的问题是,我必须设置大会(的AssemblyFileVersion)的文件版本在我的装配信息。
有没有办法给予的MSBuild,调用与版本设置属性?这样的(这不起作用):
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%
所得到的组件应具备的文件版本%主要%。%轻微%。%积聚%
。
它的痛苦,我设置在所有项目中的AssemblyFileVersion设定。而这是做这个节目是对我的哲学(我不想改变我的源与自动化流程)。的版本应通过构建脚本进行设置。这是没有必要的的AssemblyFileVersion在AssemblyInfo.cs中设置
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
还是有跟的MSBuild可能性指定一个XML配置文件,它描述了汇编的信息?
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
推荐答案
的版本
和程序集信息
任务从的MSBuild社区任务项目可能有所帮助。
The Version
and AssemblyInfo
tasks from the MSBuild Community Tasks project may help.
这篇关于设置的AssemblyFileVersion与MSBuild的呼叫?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!