我们正在使用 cc.net(巡航控制)和 msbuild 来构建一次点击应用程序。这是 msbuild 任务:
<msbuild>
<executable>C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe</executable>
<workingDirectory>D:\Directory</workingDirectory>
<projectFile>proj.lsxtproj</projectFile>
<buildArgs>/t:publish /p:PublishLocation=D:\Publish\;AssemblyFileVersion=$CCNetLabel;AssemblyVersion=$CCNetLabel</buildArgs>
<targets>Build</targets>
<timeout>600</timeout>
</msbuild>
所以我正在尝试设置已发布输出的程序集文件版本和程序集版本。
问题是变量 $CCNetLabel 似乎不起作用。如果我将 AssemblyFileVersion 和 AssemblyVersion 设置为 3.2.0.0 之类的值,则输出具有此版本号,但 $CCNetLabel 不起作用。
有没有人有任何想法如何使这项工作?
谢谢伊恩