Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2012 Automated Database deployment issue - .dacpac does not exist?

We are trying to set up automated deployment of our database project and need some help.

We are using VS2012, TFS 2012 and SQL server 2008 R2. We have a single solution file which contains all the projects. We would like to have the database project build and deploy at set intervals - say nightly.

I have created the publish profile which works, but when I schedule the build definition I get this error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets (1255): File "C:\Builds\1\projectName\Deploy Database\output\Binaries\Storage.SqlServer.dacpac" does not exist.

The build machine and deployment server is all set up correctly, as far as I can tell.

How can I fix this? We don't have a .dacpac file that I can see.

like image 333
user2160491 Avatar asked Nov 12 '22 07:11

user2160491


1 Answers

Check in the build logs and the output directory on the build server (e.g. \project\bin\Debug or \project\bin\Release) to see if the project is actually being built. If it is not being built then check the Configuration Properties of the solution to ensure that the Build flag is checked for your database project.

If it is being built but not being output then this can occurr if there are no direct references or dependencies on the database project. Check the Project Dependencies of the solution and ensure that the Depends on flag is checked for the database project.

If the database project is being built as expected but still not being deployed then there is also a Deploy flag in the Configuration Properties of the solution that may resolve this problem.

like image 111
JasonMcF Avatar answered Nov 15 '22 05:11

JasonMcF