• In VS/SSDT project you can create a snapshot of the database you might want to rollback. If your deployment failed you can deploy it back to the snapshot version from pre-deployment moment.
    Anyway, it's not a recommended way as it does not cover other changes you could have done (data changes, pre or post deployment). The best way is to enclose whole deployment script in the transaction, if possible.