我有以下exec任务,执行assemblyinfo.cs文件的checkin操作。我尝试返回退出代码,但出于某种原因它总是空白。
<!--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)"/>
。 - sll