We are using TFS build and we have a couple of custom steps within the configuration (e.g. running NUnit tests in AfterCompile
target, deployment steps in AfterDropBuild
target etc.). Now I wanted to add the functionality of sending emails on broken builds. I have configured a mail task from MS Community tasks and put it to the BeforeOnBuildBreak
target. This works perfectly if there is a compilation error, we are even getting the notification emails.
However, when there is an error in some custom task (e.g. there is a failed test in this NUnit test run), the BeforeOnBuildBreak target is not even executed. Is there some other (more general) target or any other way to execute custom logic in case of any build failure ?