【发布时间】:2011-04-13 19:29:21
【问题描述】:
我使用一些 MSBuild 参数创建了一个构建定义 (/target:Publish /property:PublishDir=\mypc\tmp\ /property:ApplicationVersion=1.0.0.1)
为每个构建自动增加 ApplicationVersion 的最佳方法是什么?
【问题讨论】:
我使用一些 MSBuild 参数创建了一个构建定义 (/target:Publish /property:PublishDir=\mypc\tmp\ /property:ApplicationVersion=1.0.0.1)
为每个构建自动增加 ApplicationVersion 的最佳方法是什么?
【问题讨论】:
首先,我建议您确保解决方案中的所有项目都使用共享的 AssemblyInfo 文件(如 here 所述)。
然后更改您的构建脚本,以便签出文件,增加版本号并保存,然后再次签入。
为此,请查看community build tasks 或create your own。
【讨论】: