Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top