0

I added a database reference to a visual studio 2019 database project. It was built by another developer, but that shouldn't matter. I point to the dacpac file and select "Same Database" as my database location and check the box to suppress reference warnings and click OK.

The resulting properties that show on that dacpac say that suppress reference warnings = false and I can no longer build my project because of reference errors.

It did not keep my selection for the suppress reference warnings setting and it will NOT let me change it back to true in the properties. I've tried to remove the reference and add it back again, the same result.

Is there something that can fix this? Some setting or something that is causing this behavior?

C Post
  • 46
  • 4
  • First of all, warnings are warnings. They are not stoppers for build. Another issue is with "Same Database", it doesn't seem logical to me allowing having errors in referenced dacpac... It is something like complaining that you having errors in your project and it is not building – Dmitrij Kultasev Oct 30 '20 at 09:18
  • well first of all the project used to build before I added the dacpac. I added it simply because I want to add views in the sqlproj and it does not like the references there even if it works on every other object DDL script. Second, it is not suppressing reference warnings at all even when I check the box to do so when adding the database reference to the sqlproj. In fact, it reverts the check to false once I save the DB reference and it will not let me change it in the properties. Either way, not cool – C Post Nov 04 '20 at 17:59
  • I've gotten this to work using a different setting on the dacpac file BUT I still don't understand why using "Same Database" for the database location will NOT let me suppress reference warnings. – C Post Nov 04 '20 at 18:02
  • You are getting reference warnings when you have some reference problems or broken objects in the referenced dacpac. It is OK to ignore such errors if you want to use just few objects from that dacpac that are OK and you don't care about other ones that are broken. However when you use "The same database" option, you are including ALL the objects into your model (new dacpac) and from this time your new model becomes broken. – Dmitrij Kultasev Nov 04 '20 at 18:14

0 Answers0