Suppress some warnings in SQL Server SSDT

Jason Kresowaty picture Jason Kresowaty · May 31, 2012 · Viewed 17.9k times · Source

In SQL Server Data Tools, I would like to suppress some, but not all, occurrences of SQL71502 ("--- has an unresolved reference to object ---"). I know I can suppress through Project Properties, Build, Suppress Transact-SQL warnings, but this will globally suppress. Can this be done?

Answer

Varun picture Varun · Feb 27, 2014

You can suppress it at individual file level which contains the code generating the warning if you want. Something like this.

<Build Include="Stored Procedures\X.sql">
    <SuppressTSqlWarnings>71502</SuppressTSqlWarnings>
</Build>