How to: Suppress One or More Types of Warnings

You can suppress the display of one or more types of warnings throughout your database project or for a specific file in your project. A suppressed warning is ignored and will not cause the build to fail, even if you have chosen to treat warnings as errors.

You identify any warning that you want to suppress by the number that appears at the start of the warning in the Error List window. For example, you would identify the warning "TSD3022: The following cross-server dependencies could not be verified:…" by the number 3022.

To specify a list of warnings to suppress throughout the database project

In Solution Explorer or Schema View, click the database project for which you want to suppress one or more warnings.

On the Project menu, click DatabaseProjectName Properties.

The properties window for the database project appears.

Click the Build tab.

In Suppress Warnings, type the list of warning numbers that you want to suppress, and delimit them with commas or semi-colons.

On the File menu, click Save Selected Items.

After you save the changes, warnings that start with the number or numbers that you specified no longer appear in the Error List window.

To specify a list of warnings to suppress for a specific file

In Solution Explorer, click the file for which you want to suppress one or more warnings.

On the View menu, click Properties Window.

The properties window for the file appears.

In the Suppress Warnings property (contained in the Advanced section), type the list of warning numbers that you want to suppress, and delimit them with commas or semi-colons.

On the File menu, click Save All.

After you save the changes, warnings that are in that file and that start with the number or numbers that you specified no longer appear in the Error List window.