How to: Enable or Disable Compiler Warnings
The Visual Basic compiler can detect potential problems in your code and issue warnings so that you can review them. By default, all compiler warnings are added to the Task List during compilation. You can change the behavior of the compiler so that it does not issue warnings, or so that it will treat warnings as compilation errors that must be fixed immediately.
Compiler warnings can be enabled or disabled in the Compile page of the Project Designer.
Note
Enabling or disabling certain compiler warnings may also change the value of the Option Strict property. For more information, see How to: Set Compiler Options.
To disable all compiler warnings
With a project selected in Solution Explorer, on the Project menu click Properties.
Click the Compile tab.
Select the Disable all warnings check box.
To disable a single compiler warning
With a project selected in Solution Explorer, on the Project menu, click Properties.
Click the Compile tab.
In the Default Compiler Options table, set the Notification value for the warning to None.
To treat all compiler warnings as compilation errors
With a project selected in Solution Explorer, on the Project menu, click Properties.
Click the Compile tab.
Select the Treat all warnings as errors check box.
To treat a single compiler warning as a compilation errors
With a project selected in Solution Explorer, on the Project menu, click Properties.
Click the Compile tab.
In the Default Compiler Options table, set the Notification value for the warning to Error.