我有以下執行任務,執行簽入的assemblyinfo.cs文件。我試圖返回退出代碼,但由於某種原因它總是空的。MSBuild執行任務,退出代碼空
<!--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>
我已經試過2種方式來讀取退出代碼:
'%(ErrorCode.Identity)'
'$(ErrorCode)'
兩者都是空的。有什麼建議麼?
奇怪的是,嘗試''''' –
sll