I'm struggling a bit how I should do proper error handling in SSDT, particularly in a pre deployment script. I noticed that for what ever reasons the SQLCMD syntax
:on error exit
is not working. However how should I stop the deployment if the pre deployment script creates an error ? Also
GOTO for example to the end of a post deployment script seems not working. Is it really possible that SSDT doesn't support error handling ?
Most obscure, when I set the publish setting "Script state checks" the generated script itself is using
:on error exit, however if I use it in my own pre deployment script I get an error message that it's not allowed (eventhough the code is marked as SQLCMD syntax).