【发布时间】:2012-06-19 07:18:01
【问题描述】:
我有以下 exec 任务,执行 assemblyinfo.cs 文件的签入。我试图返回退出代码,但由于某种原因它总是空的。
<!--Checkin if all succeeded-->
<Exec Condition=" '$(LocalCompilationSuccess)' != 'Failed' and '$(LocalTestSuccess)' != 'Failed' " ContinueOnError="True"
Command='"$(TfCommand)" checkin /recursive /comment:"$(NoCICheckInComment) $(BuildDefinitionName): build succeeded, checkin changes." /override:"TeamBuild $(BuildDefinitionName)" $/SomeProject/Trnk' WorkingDirectory="$(SolutionRoot)" >
<Output TaskParameter="ExitCode" PropertyName="ErrorCode"/>
</Exec>
我尝试通过两种方式读取退出代码:
'%(ErrorCode.Identity)'
'$(ErrorCode)'
两者都是空的。有什么建议吗?
【问题讨论】:
-
奇怪,试试
<Message Text="The exit code is $(ErrorCode)"/>