views:

2911

answers:

5

On the build tab in a Web Application project I have a setting called "Warning Level". I can set a value from 0 to 4. What do these values mean? Will a value of 0 be more strict and generate more warnings, or vice versa? I haven't been able to find any documentation on it yet, but perhaps I'm looking in the wrong place.

+4  A: 

This link shows you the definitions of the warning levels (I'm assuming you are using C# code in your web project). Level 4 is the most strict.

mwigdahl
Thanks, that's exactly what I was looking for.
Jon Tackabury
A: 

0 turns off warnings completely, while 4 is the most verbose level. See the documentation here which has the same warning levels.

Adrian Grigore
+1  A: 

Higher is stricter. It can be annoying to see all the warnings that may or may not mean much to your app, but taking the time to clear them up can teach you a lot.

royatl
A: 

For example setting a warning level to 4 or /W4 means the compiler will treat all warnings as errors. It's mostly how the compiler reacts when it sees something that it doesn't feel good about. And, by the way, a level of 0 turns of all warnings.

dirkgently
A: 

You can check Microsoft's levels here. Level 0 is essentially none while level 4 will be the most strict.

itsmatt