views:

390

answers:

1

Is there a switch to suppress specific compiler warnings when using the aspnet_compiler.exe warnings at the command line?

I've tried fixing the errors myself, rather than ignoring them - they are for events that are defined by never used. I simply commented out the events, but this caused other problems! It's as if they are used but the compiler doesn't recognise that (which seems unlikely).

I'm calling the compiler from the command line, and I'm using Visual Web Developer Express, which does not have the detailed build options in the Project Properties Build dialog that can be found in the full version of Visual Studio.

+1  A: 

In the end I used

#pragma warning disable [warning no]
    some code that triggers a warning
#pragma warning enable [warning no]

in my code, as per http://msdn.microsoft.com/en-us/library/441722ys.aspx. This works fine and although needs entering once for each compiler warning, it seems to be the best fit.

fearoffours