Automatic update database in continuous deployment with Visual Studio 2012 and TFS 2012

A few weeks ago, I applied the following steps to publish our developers app on our testing website.

  • Get the latest (recursive) version in Solution Explorer.
  • Run the database update in the package manager console.
  • "Publish ..." in Solution Explorer.

This worked, but we decided to automate this using Continuos Integration in the assembly definition. I put the following MSBuild arguments in the assembly definition

/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:MSDeployPublishMethod=WMSvc
/p:CreatePackageOnPublish=True
/p:DeployIisAppPath="MyProject-testing"
/p:MsDeployServiceUrl=tfs.mydomain
/p:username=Administrator
/p:password=MYPassw!
/p:AllowUntrustedCertificate=True
/p:SkipExtraFilesOnServer=True

tfs.mydomain, . , , . , . .

, , Update-Database ?

, .

+5

All Articles