Hi Tom,
Thank you for your answer. The customization code will never have the same objects as the general code since the customization code uses other prefixes.
Example "upg_" for a "user procedure, general" and "upc_" for a "user procedure, customization". Our technical consultants that work at our users site are never allowed to change or override the general code. We have hooks they can use if they want to override the general behaviour without the need to override general code. I already did some test with including a reference to the "general" dacpac. Everything works fine as long as the "publish" doesn't throw away objects it doesn't know. I have to think about how to get rid of discontinued objects, but that doesn't overly bother me. Maybe I can cook something up with the ScriptDom.
Do you happen to know if I can publish the customization project without publishing the general project? The general project contains over 14,000 objects (it is an ERP solution; ERP solutions are big as a general rule) and takes a long time to publish. The customization code contains a couple of hundred objects, max. Also, the general project only changes twice a year because we ship a new version every April and October. The customization code is much more volatile. It seems a waste of time to check for changes in 14,000 objects every other week while we know nothing has changed. Also, we have partner companies that also write customization. I am willing to give them the general dacpac, but I do not want them to publish the general project. Deploying a new version of our application is always done under the supervision of one of our most experienced technical consultants. Most of our 600+ customers do not have a real DBA. Although publishing a dacpac at the customer's site works fine in 99% of the cases, for the 1% that does throw an error, you really ought to know what you are doing. After all, most of the time production for the customer will stop if the ERP solution doesn't work.
It is fine with me if you do not have an answer for my second question. I can experiment myself.
Thanks again for the tip of referencing the general dacpac, it works like a charm.