Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database Project - "Reference to external elements from the source named x could not be resolved

We have two database projects, x and x_audit. x has a reference to x_audit.

x_audit deploys fine, but when trying to deploy x we get the error:

The reference to external elements from the source named x_audit.dbschema could not be resolved, because no such source is loaded.

The same files work fine deploying to a 2005 database, we only get this error when deploying to 2008. If it makes any difference, this is upgrading an existing database rather than creating a new one. It used to work fine on both 2005 and 2008, not sure what's changed.

Thanks

like image 588
Matt Avatar asked Jul 09 '12 07:07

Matt


2 Answers

When you add the database reference, check the checkbox to "Suppress error caused by unresolved references in the referenced project".

The vague language about "external elements" means x_audit has a reference to something too. And that something is not referenced by x, so x doesn't know about it.

like image 158
Tim Partridge Avatar answered Oct 02 '22 22:10

Tim Partridge


If you have a database "A" referring to an external database dacpac "B", you need to include all the necessary references from "B" in the project for "A" or "A" won't build. Alternatively, you can set suppress unresolved references to True and the compiler will ignore the missing references.

Suppressing unresolved references is necessary if you have circular references between your databases.

enter image description here

like image 11
FistOfFury Avatar answered Oct 02 '22 21:10

FistOfFury