Deploying Visual Studio "Database Projects" (MS Build)

Hello,

in my Visual Studio (2008) solution, I have a database project ("SQL Server 2005 Database project"). The comfortable thing with the database projects is that when building the solution, the database project is automatically deployed. And when deploying, VS first creates a "delta" script after comparing the database schema of the development instance with the schema of the production or target database  and then second deploys it by running the script on the database server.

I would like to automate this with final builder. I have recognized that when building the MS Project Action, the "delta" script will be created, but not deployed.

Anyone has experiences with that? What am I doing wrong that the script will not be deployed?

Thanks,

Hannes

 

 

Hi Hans,

Thanks for your post. If you build the “Deploy” target from MSBuild then the database project should deploy.

FYI, you can also override the default target database, connection type, etc. by supplying extra properties to the project. There is some information about that here:

http://msdn2.microsoft.com/en-us/library/aa833165(VS.80).aspx

Regards,

Angus