May 11, 2004OK, found it. The Design Compiler manual gives to command I need: To suppress warning and error messages, use the suppress_errors command
Suppress specific warnings for C++
You can suppress warnings in a C++ project by using the project properties; you use the Configuration Properties property page to suppress specific warnings for an entire C++ project. You can also suppress warnings in specific files by using #pragma warning .
To suppress warnings by category, you can use the Compile property page. If you want to disable a warning in a specific part of a code file, use #Disable and #Enable directives.
You can suppress warnings in a C++ project by using the project properties; you use the Configuration Properties property page to suppress specific warnings for an entire C++ project. You can also suppress warnings in specific files by using #pragma warning .
How do I suppress compiler warnings in NuGet?
In Solution Explorer, select the NuGet package you want to suppress compiler warnings for.
From the right-click or context menu, select Properties.
In the Suppress warnings box of the package's properties, enter the warning number you want to suppress for this package.
How do I suppress compiler warnings in Visual Basic?
To suppress warnings by category, you can use the Compile property page.
If you want to disable a warning in a specific part of a code file, use #Disable and #Enable directives.
For more information, see Configure warnings in Visual Basic.
This example shows you how to edit the .vbproj file to suppress specific compiler warnings.
How to suppress a pragma warning?
Use a #pragma warning (C#) or Disable (Visual Basic) directive to suppress the warning for only a specific line of code.
You can use a SuppressMessageAttribute to suppress a warning either in the source file or in a global suppressions file for the project ( GlobalSuppressions.cs or GlobalSuppressions.vb ).
How to suppress a warning in C#?
If you want to suppress a warning only in a specific part of the code in C#, use #pragma warning.
For F#, use #nowarn preprocessor directive to disable a warning for an entire source file.
In Solution Explorer, choose the project in which you want to suppress warnings.
Right-click on the project node, and choose Properties on the context menu.
Overview
Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
Suppress a warning by editing the project file
Using the Visual Studio property designer to suppress warnings results in a change to the project file.
At times, it can be more convenient to hand-edit the project file to accomplish the task of disabling a warning.
The project file is processed by MSBuild, Microsoft's build engine.
See MSBuild.
Suppress a warning from the build command line
If you're building a project from the command line, you can also suppress warnings by using -warnAsMessage at the MSBuild command line.
Use quotes around lists of multiple warning codes.
Suppress specific warnings for C++
You can suppress warnings in a C++ project by using the project properties; you use the Configuration Properties property page to suppress specific warnings for an entire C++ project.
You can also suppress warnings in specific files by using #pragma warning.
This article covers the project-level control, but if your intent is to disable a warning in a particular file or just around a few lines of code, but you want to continue to see other occurrences of the same warning, you should consider using #pragma warning.
See #pragma warning.
Suppress specific warnings for Visual C# or F#
Use the Build properties to suppress specific warnings for an entire C# and F# project.
If you want to suppress a warning only in a specific part of the code in C#, use #pragma warning.
For F#, use #nowarn preprocessor directive to disable a warning for an entire source file.
Suppress tool warnings
How you suppress warnings from tools other than the compiler, such as MSBuild, depends on what type of project you have and what version of MSBuild you're using.
Suppress warnings for NuGet packages
In some cases, you might want to suppress NuGet compiler warnings for a single NuGet package, instead of for an entire project.
The warning serves a purpose, so you don't want to suppress it at the project level.
For example, one of the NuGet warnings tells you that the package may not be fully compatible with your project.
If you suppress it at th.
Suppress warnings for Visual Basic
You can hide specific compiler warnings for Visual Basic by editing the .vbproj file for the project.
To suppress warnings by category, you can use the Compile property page.
If you want to disable a warning in a specific part of a code file, use #Disable and #Enable directives.
For more information, see Configure warnings in Visual Basic.