I have a mixed solution with a couple of Web applications and SQL Database projects.
I also have a remote test server with MS SQL 2012 and IIS 7. The TFS build server is on another machine. All the servers are configured on a single domain.
I would like to deploy the databases and the web applications during the build process.
Now I have set up build package generation in a TFS XAML process file using the following flags:
/p:DeployOnBuild=True
and I have also set up other flags for web publishing:
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=True
/p:MsDeployPublishMethod=WMSVC
/p:AllowUntrustedCertificate=True
but I am a bit confused which method should I use: WMSVC or Remote Agent or something else. Which is the easiest way to set up the Web deployiment from TFS build server to IIS 7 server and avoid problems with user accounts (to avoid setting /p:UserName=YOURUSERNAME /p:Password=YOURPASSWORD in XAML or build definition) ?
The other concern is about Database projects. The build process has generated some .dacpac files. What would be the best way to deploy them from the TFS build process XAML?
As my solution has mixed types of projects, I am not sure how to adjust my build process so it correctly detects which projects need database deploy and which need Web deploy.
I hope MSBuild/MSDeploy is smart enough to just ignore those /p: flags if the currrent project is not a web app or maybe it will genereate a failure for entire build process?