The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

/nowarn (Suppress Specified Warnings) (C# Compiler Options) 

The /nowarn option lets you suppress the compiler from showing one or more warnings. Separate multiple warning numbers with a comma.


number1, number2

Warning number(s) that you want the compiler to suppress.

You should only specify the numeric part of the warning identifier. For example, if you want to suppress CS0028, you could specify /nowarn:28.

The compiler will silently ignore warning numbers passed to /nowarn that were valid in previous releases, but that have been removed from the compiler. For example, CS0679 was valid in the compiler in Visual Studio .NET 2002 but was subsequently removed.

To set this compiler option in the Visual Studio development environment

  1. Open the Properties page for the project. For details, see How to: Set Project Properties (C#, J#).

  2. Click the Build property page.

  3. Modify the Suppress Warnings property.

For information on how to set this compiler option programmatically, see DelaySign.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft