-nowarn (C# Compiler Options)
The -nowarn option lets you suppress the compiler from displaying one or more warnings. Separate multiple warning numbers with a comma.
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
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.
The following warnings cannot be suppressed by the
Compiler Warning (level 1) CS2002
Compiler Warning (level 1) CS2023
Compiler Warning (level 1) CS2029
To set this compiler option in the Visual Studio development environment
Open the Properties page for the project. For details, see Build Page, Project Designer (C#).
Click the Build property page.
Modify the Suppress Warnings property.
For information about how to set this compiler option programmatically, see DelaySign.
Send feedback about: