I’m specifying a timeout for an MSBuild Exec task like this:
<Exec Command="MyCommand.bat" Timeout="3000" />
If my command times out, MSBuild issues a warning. I would like it to instead issue an error that fails the build. How can I achieve that?
Use the OnError element and the Error Task: