We are using a bat file to build a Visual Studio project. If a problem occurs we would like to promote information about that to TeamCity as failure.
As suggested in product documentation we tried something like this:
IF NOT EXIST %1\File.exe GOTO error
The problem is this command is not interpreted correctly and build fails with:
'##teamcity[buildStatus' is not recognized as an internal or external command,
operable program or batch file.
Process exited with code 1
This produces failure too but not the one we would like. What are we doing wrong?