DACPAC not including composite objects

*爱你&永不变心* 提交于 2019-12-12 08:59:54

问题


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?


回答1:


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.




回答2:


I had the same problem when publishing dacpac with dacfx. As answered here, I had to activate the "Include composite objects" option. But that's not all. When you compile your project, Visual Studio generates two dacpac files in your "second" project. You must put both files in the same directory when you deploy the second project.

Hope that helps, for me it did ;-)



来源:https://stackoverflow.com/questions/18596402/dacpac-not-including-composite-objects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!