Suppress Database Project errors and warnings in visual studio 2010

Updated answer

In VS 11+ the option has moved to Tools > Options > SQL Server Tools > General -> Errors and Warnings (set to 0 to get get a single error line)

You can exclude the project from the build configuration to avoid build failure.

For older versions

Options -> Database Tools -> Database Errors and Warnings -> set the maximum at 0 and from now on the error window will have a single entry that will say something like

Error 1 The maximum number of 0 errors has been reached. 76 total errors, 0 total warnings, and 0 total messages were encountered.


Just had this problem in Visual Studio 2015.

Halfway along the header of the Error List panel, there is a (unnamed) dropdown with values 'Build + Intellisense', 'Build Only', 'Intellisense Only'. Mine was set to 'Build + Intellisense'. Changing it to 'Build Only' got rid of all the (200+) errors.


Select the file in the project:

example: projectDatabase\ddl\table_name.sql

on the Properties Window of the file set

Build Action : None.

While building it doesn't look in this files for errors or warnings.


To surppress a specific warning, go to project properties -> Build.

Type in the warning numbers (i.e. without 'SQL') in comma delimited format in field "Suppress Transact-SQL warnings:".