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

Matt picture Matt · Jul 9, 2012 · Viewed 12.6k times · Source

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

Answer

Tim Partridge picture Tim Partridge · Mar 11, 2014

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.