/warnaserror (Visual Basic)
Causes the compiler to treat the first occurrence of a warning as an error.
/warnaserror[+ | -][:numberList]
|
Term |
Definition |
|
+ | - |
Optional. By default, /warnaserror- is in effect; warnings do not prevent the compiler from producing an output file. The /warnaserror option, which is the same as /warnaserror+, causes warnings to be treated as errors. |
|
numberList |
Optional. Comma-delimited list of the warning ID numbers to which the /warnaserror option applies. If no warning ID is specified, the /warnaserror option applies to all warnings. |
The /warnaserror option treats all warnings as errors. Any messages that would ordinarily be reported as warnings are instead reported as errors. The compiler reports subsequent occurrences of the same warning as warnings.
By default, /warnaserror- is in effect, which causes the warnings to be informational only. The /warnaserror option, which is the same as /warnaserror+, causes warnings to be treated as errors.
If you want only a few specific warnings to be treated as errors, you may specify a comma-separated list of warning numbers to treat as errors.
Note
|
|---|
|
The /warnaserror option does not control how warnings are displayed. Use the /nowarn option to disable warnings. |
|
To set /warnaserror to treat all warnings as errors in the Visual Studio IDE |
|
|
To set /warnaserror to treat specific warnings as errors in the Visual Studio IDE |
|
Note