visual-studio-2012sql-server-data-toolsssms-2012database-deploymentdacpac

DACPAC not including composite objects


I have a VS2012 database project which includes tables, stored procs, views etc.

I then have a second database project which contains a database reference to the first project. I have ensured that the "Include composite objects" options is selected from the "Project Properties -> Debug -> Advanced" menu.

When I build the second project and take the resulting DACPAC file and deploy it through SSMS2012 it doesn't create the firsts project's objects.

Am I missing something? Why don't the composite objects get included in the DACPAC?


Solution

  • As Peter Schott said in the comments above, I needed to deploy both outputted Dacpacs in order, with the referenced database first.

    You cannot do this through SSMS, it won't allow you to deploy two different Dacpacs to the same database. But it is not a problem through SQLPackage.