CliGenerator wont return any ERROR_LEVEL code. It will just write the log to the output file you indicate in the parameters, and if there is any exception it just will write it to the output.
However you can extend it. This is an example which just trap the exception and exits with an error code "1".
- Grab the SourceCode from the v3.1 additional downloads (Customer Area).
- Open the CliGenerator SourceCode and go to Startup.cs line 269. There is when the exception is caught.
- Write code to exit the application:
catch(Exception ex)
{
GeneralUtils.DisplayException(ex);
Environment.Exit(1);
}
- Compile and replace the executable in the LLBLGen installation folder.
- In your batch:
@echo off
"cligenerator.exe" "_LLBLGen Project\NW.LLBL.MSSQL.Adapter.v31.llblgenproj" .\out\ 1 output.txt
if errorlevel 1 (
echo Something is wront. Error: %errorlevel%
exit /b %errorlevel%
)
This is just some trivial example but you get the idea