Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL71501 - How to Suppress this Error

My team/company tried out SSDT for a few small projects and we were quite impressed.

Recently we investigated use of SSDT for one of our larger existing applications and got FLOODED with SQL71501 errors for external database references.

There is quite a web of database coupling for the application, so that is understandable.

Is there some way to suppress/disable/turn off this check so a SSDT project can build regardless of these unresolved references?

Most discussion on this Error Code incorrectly describe it as a warning, not an Error.

Visual Studio 2015 Enterprise - latest SSDT pack SQL 2008

like image 992
user5855178 Avatar asked Jan 28 '18 15:01

user5855178


2 Answers

I was just about to cleanup a few of these in my solution after upgrading to a new version of sql server. I'm on VS2017 but I think this was the same.

If you have database projects in the solution already for the referenced databases, then you can just add database references to the project throwing the errors. If you already have these references, edit the reference properties and set Suppress Reference Warnings to true.

[EDIT: Suppress Reference Warnings seems to have no affect on invalid references.]

If you don't have database projects for the solutions, you will need to add them. You won't necessarily need to fill them in with all of the database object if you check the Suppress Reference Warnings box.

Good luck!

like image 52
Obie Avatar answered Nov 02 '22 23:11

Obie


I had success with Visual Studio 2017 by adding the exact warning code against the file that was having the trouble, in my case it was "un resolved reference" I didnt want to add a reference to the master DB to my project.

Right click on File, Properties, Suppress TSql Warnings : 71502

like image 30
cryptomatt Avatar answered Nov 03 '22 01:11

cryptomatt