CCNet:如何将 svn 修订号复制到 MSBuild 中的文件中?
有谁知道如何将LastChangeNumber
参数传递到MSBuild中?
我正在尝试使用这个:
<Exec Condition=" '$(LastChangeNumber)' != '' " Command=">\\server\destination\subversion_revision.txt echo subversion $(LastChangeNumber)" />
如果我从MSBuild中省略LastChangeNumber参数,它会成功忽略条件,如果我传入像 /p:LastChangeNumber=foo
这样的铺位参数,则会成功。但是,当我尝试此操作时:
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<projectFile>MySolution.sln</projectFile>
<buildArgs>/noconsolelogger /p:Configuration=Debug /p:LastChangeNumber=$(LastChangeNumber) /v:diag</buildArgs>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
我在 CrusieControl.NET 服务器日志中收到错误:
ThoughtWorks.CruiseControl.Core.Config.Preprocessor.EvaluationException: 引用未知符号 最后更改编号
Does anyboy know how to pass the LastChangeNumber
parameter into MSBuild?
I'm trying to use this:
<Exec Condition=" '$(LastChangeNumber)' != '' " Command=">\\server\destination\subversion_revision.txt echo subversion $(LastChangeNumber)" />
Which successfully ignores the condition if I leave out the LastChangeNumber parameter from the MSBuild, and succeeds if I pass in a bunk parameter like /p:LastChangeNumber=foo
. However, when I try this:
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
<projectFile>MySolution.sln</projectFile>
<buildArgs>/noconsolelogger /p:Configuration=Debug /p:LastChangeNumber=$(LastChangeNumber) /v:diag</buildArgs>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
I get an error in my CrusieControl.NET server log:
ThoughtWorks.CruiseControl.Core.Config.Preprocessor.EvaluationException:
Reference to unknown symbol
LastChangeNumber
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我找到了一种方法:
使用自定义贴标机:
Well, I found ONE way to do it:
With a custom labeler: