Visual Build Professional(Pro,vbp)具有“成功退出代码”,我可以在其中放入白名单值...(当我将调用定义为外部.exe )从控制台应用程序捕获退出代码
当我创建对外部.exe的调用时,如何捕获返回码/退出代码并将其放入宏中?
基本上,我试图在Visual Build Pro中做下面的msbuild。
也就是说,捕捉“的ExitCode”的价值属性(在VBP语言宏)......叫MyExitErrorCode
<Target Name="ExecuteSomeEXETarget">
<Exec Command='"C:\Some.exe"' ContinueOnError='true'>
<Output TaskParameter="ExitCode" PropertyName="MyExitErrorCode"/>
</Exec>
<Message Text="The exit code is $(MyExitErrorCode)"/>
<Error Text="Error while executing Some EXE" Condition="'$(MyExitErrorCode)' > '0'" />
</Target>