I'm using psake and the Powershell runner in TC 6.5
I have a build with two steps, the first uses psake and the 2nd is NUnit (which is not really relevant here)
From the sake script I output "##teamcity[buildStatus status='ERROR' text='Failed to build web applications' errorDetails='BuildWeb psake step failed']" if a step fails and in the build settings I have the "Fail build if an error message is logged by build runner" checked.
However when I output the text the build carries on executing (i.e. the NUnit task executes) although the correct error message (Failed to build web applications) appears in the main UI.
Can I get the build to fail and stop after outputing the error message from within my build script?