SQL71501 - How to Suppress this Error
Asked Answered
C

2

7

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

Crespo answered 28/1, 2018 at 15:54 Comment(2)
How many different references are you looking at trying to resolve here? It's doable, but takes some time. The only solid way to handle these in your scenario is to create the references. I used a "shared" folder to contain the schema dacpacs and then reference those. It's not quick, but it does work.Yakut
@user5855178, did you come up with a solution for that? If yes, please share it here. I have the same problem here and that would be a great help.Laroche
K
3

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!

Knownothing answered 28/1, 2018 at 17:56 Comment(5)
I had already looked into the Database reference feature. I would challenge the use of the word "just" here... Database references are not as clean and tidy as one would hope. A LOT of errors and other issues turn up.Crespo
I cannot even find a means to easily edit a Database Reference. Once this is set you are stuck with it, OR you have to delete the whole reference and recreate. Yes, this is the reccomended solution from MS, but it leaves much to be desired. For small applications with a single standalone database SSDT works well... for large applications with a half dozen or more references SSDT has some serious challenges.Crespo
I also don't know what you have done with your VS 2015, but in our Enterprise version setting the suppress warnings to true accomplishes absolutely nothing. The warnings continue to show up on every build as errors...Crespo
You are correct, I've added some invalid references for test purposes and I cannot suppress them using that setting on the database reference. It seems that the references must all be valid to get rid of these error messages.Knownothing
The problem is this is a large enterprise application, not a standalone basement project. There are hundreds of these references. Find and replace helps, but it's not a silver bullet. MS needs to find a way to work with the code as written rather than asking us to edit hundreds of linked server or direct server references.Crespo
B
3

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

Baylor answered 25/2, 2018 at 21:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.