我有以下 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)'
两者都是空的。有什么建议么?