Eviler
Eviler

Reputation: 39

Dacpac to sqlproj - programmatically

I am trying to automate the following steps:

We currently try to keep our database project (.sqlproj) up to date with out database, but this is currently a manual procedure. We open Visual Studio, put our database as source, put our sqlproj as target, select the pieces we want (we only need the tables, views, indexes and stored procedures) and then run a comparison. When that is done, we hit the 'update' button and our sqlproj file gets updated with the files generated or updated. We check this in and done.

enter image description here

Now I'm trying to automate this process. I'm able to generate the source dacpac file with sqlpackage and I can run a comparison script with the dacpac generated using msbuild OR update a target database, but I can't find how to update the sqlproj like the Update button on the above screenshot does.

I've found DACExtensions to try to simulate the behaviour, but it seems the Update button works in its own specific way.

Long story short: what command do I need to run in order to simulate the 'Update' button?

Any and all help would be appreciated :)

Upvotes: 0

Views: 307

Answers (0)

Related Questions