1

we have the following SSDT project structure:

DBCore project: includes all objects that are not sql server edition exclusive.

DBStandardEdition project: includes all standard edition specific objects.

The DBStandardedition project references the DBCore project with the "same database" option.

When I publish the DBStandardEdition project to my demo server via visual studio directly, everything works. All the standard edition related objects are created correctly.

When I compare the database on the demo server to my dacpac file with the schema comparison tool in visual studio, the tool wants to drop all objects I have defined within DBStandardEdition project. We also have a program that publishes the dacpac files with the DacServices - Class (DacServices.Deploy). This program actually drops everything defined in my DBStandardEdition.dacpac file.

Am I doing something wrong here or is it a bug?

Update I figured out a problem in my project settings. I have set the "Build output file name" for all databaseprojects to the same value. After I changed this, Visual Studio generates two DacPac - Files in my DBStandardEdition\Bin\Release Folder. DBCore.dacpac And DBStandardEdition.dacpac. When I now use the compare tool of visual studio to compare the DBStandardEdition.dacpac to my Database (and enable the "Include composite objects (database target only)" - option), all looks good. Newly added objects to DBCore project are listed with "Add", all my objects in my DBStandardEdition projects are still there. When I activate the Deployoption "Include composite objects..." everything deploy fine.

Community
  • 1
  • 1
Weissvonnix
  • 731
  • 7
  • 23

1 Answers1

1

You need to enable the "Include composite objects (database target only)" option in the Schema Compare Options. This is off by default and means that the referenced objects are being excluded from the comparison.

Kevin Cunnane
  • 8,020
  • 1
  • 32
  • 35
  • thank you! Now, for the schema comparison tool it works! But we already hat that option set to true in the DacDeployOptions - Class we give as a parameter to DacService.Deploy Method. I have found another post at this subject [here](http://stackoverflow.com/questions/18596402/dacpac-not-including-composite-objects) but it just don't looks right, I don't know... – Weissvonnix Sep 16 '14 at 06:50
  • 1
    I updated my question a few times. I just did not give the right options-object to my Deploy Method. Thanx again! – Weissvonnix Sep 16 '14 at 14:24