2012-02-03 1 views
2

으로 MSBuild를 간부 인 작업 시간 초과를 취급 :나는이 같은 MSBuild를 Exec에서 작업에 대한 시간 제한을 지정하고있어 오류

<Exec Command="MyCommand.bat" Timeout="3000" /> 

을 내 명령 시간, MSBuild에서 경고를 발행합니다. 대신 빌드를 실패하는 오류를 발행하고 싶습니다. 어떻게하면 될까요?

<Target Name="ExecCommand"> 
     <Exec Command="MyCommand.bat" Timeout="3000" /> 
    <OnError ExecuteTargets="TimeoutErrorHandler"/> 
</Target> 

<Target Name="TimeoutErrorHandler"> 
    <Error Text="Command timeout"/> 
</Target> 

답변

관련 문제