Building dacpac only when there are changes

495 views Asked by At

Using Visual Studio 2015 and TFS 2012.

We use a TFS build server to build and deploy our project. Building and deploying the dacpac for our database takes up most of our deployment time. A lot of times, there are no changes to the database.

Is it possible to not have the dacpac build when there are no changes to the database?

1

There are 1 answers

0
Ed Elliott On

There isn't anything built in but you can do something yourself to stop it being built/deployed - I have seen people store a version in the database (table or extended property if you like) then also a version in source control - if they are the same skip the build/deploy step - fairly trivial to set up.

A couple of things to bear in mind:

  • This can lead to database drift if people are allowed to deploy outside of this system
  • Unless you have thousands of objects then it shouldn't take too long, I haven't worked on a database where it was so slow the background jobs took too long to build/deploy (the day to day, dev locally making changes and testing sure but not builds on a build server)

How long does it take?

Have you looked at why it is too slow?

Ed