csc.exe - return values.

  • Thread starter Thread starter Gemma M
  • Start date Start date
G

Gemma M

Hi,

I am trying to automate our build process using NMAKE. However, CSC.EXE,
C#'s command line compiler, does not appear to set ERRORLEVEL when an error
occurs.

Does anyone know how it can be determined that a compilation error has
occurred in CSC.EXE?

Thanks
Gem
 
Hi Gemma,

If you launch csc.exe as a process while also setting output to your own
stream anything output from 'csc.exe /nologo' will either be an error or a
warning. You will have to read each line to see which.
 
Thanks for the response. What was actually happening though, is that there
was an environment variable ERRORLEVEL set, which was masking the Command
Window's ERRORLEVEL facility. So, before doing anything significant, I did

SET ERRORLEVEL=

to clear the variable. And all is well now.

Gem
 
Back
Top