Visual Build Professional (Pro, vbp)에는 허용 된 값을 넣을 수있는 "성공 종료 코드"가 있습니다 ... (외부 .exe로 호출을 정의 할 때))콘솔 응용 프로그램에서 종료 코드 캡처
외부 .exe에 대한 호출을 만들 때 어떻게 return-code/exit-code를 캡처하여 매크로에 넣을 수 있습니까?
기본적으로 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>