How do you throw an error from within an MSBuild task and force the build to fail. Something like:
<Task>
<ThrowError Condition="$(SomeCondition)" Message="There was a problem with the build" />
</Task>
Use the Error Task
<Error Condition="$(SomeCondition)" Text="There was a problem with the build" />
The Error-task would do the trick.
<Error
Text="errormessage"
Condition="errorcondition" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With