I just observed a difference in the result of publish vs schema compare. I made changes to visual studio database project - some of which involved deleting tables.

  1. Pushed changes to VSTS, build successful, release successful to Azure DB
  2. Inspected said Azure DB. Tables were not dropped that were deleted in the project. Double checked the publish script - this didn't include any of the drops.
  3. Ran SchemaCompare - this exposed all of the missing drops, and when executed gave me the result I expected (the applicable tables were dropped).

The same results were observed on local DB when manually publishing vs schema compare. What am I doing incorrectly? I thought publish would drop the tables.

2 Answers 2


Publish>Advanced Settings>Drop>"Drop objects in target but not in source"


  • Thirty minutes later, and I finally find this solution. Frustrating! Jan 23, 2019 at 15:31

Visual Studio DB Projects seems to be a poor choice for managing db changes. There are so many different settings that must be set to get the desired effect like setting the "Drop objects in target but not in source". Also the post deploy scripts need to be set to no build action but the Scripts.Postdeployment1.sql needs to be set to PostDEploy build action.

If the project doesnt work properly its difficult to figure out what happened.

This is definitely not as transparent as normal T-SQL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.