I have a simple batch script running the command line in the pre-build event is just
C:\path\to\batch\script\PreBuildGenANTLR.bat
The batch script contains
@echo off
pushd ..\..\Parser
java -jar ..\ANTLR\antlr-3.5-complete.jar -o .ANTLR ExprCppTree.g
popd
I've tried exit 0 exit \b 0 SET ERRORLEVEL = 0 but it seems like no matter what I do the script runs but the build stops and errors out with error MSB3073 exited with code -1. I've tried a bunch of other things to make this script return zero including the steps outlined at http://blogs.msdn.com/b/astebner/archive/2006/08/08/691849.aspx . Still nothing. The script runs with a bunch of warnings but no errors. It does what it's supposed to do but still the build stops and exits with code -1. What in the heck am I doing wrong? How can I make it return zero and continue the build?