I have a Visual Studio database project with several stored procedures. I deleted one of them and then published the project. But the SP was still present on the published database and I had to delete manually.
I would want the VS project to be the point of truth for the database. But at the same time, I'm publishing to a production database that has data.
Is there a way to delete files in a VS database project so that those changes reflect on the published database?
Best Answer
The easiest way is using "Schema compare", where you would manually select objects to be dropped/ignored/added. to do this:
If you wish to DELETE (DROP) database objects in production database, that do not exist in your Database Project, you should successfully Build and Publish the project on production database using default settings.
If you have performed the Build successfully, proceed like this: