Reputation: 188
I can't seem to find whether it is possible in Visual Studio to cancel a build by checking something in a pre build event. Is this possible? If so: how?
Thanks in advance!
Upvotes: 1
Views: 538
Reputation: 188
I can use exit /b 1
. It intentionally causes the pre-build event to fail by setting the %errorlevel% to 1, stopping the build. The error message is not great.
Upvotes: 3