I am using Visual Studio Online to deploy my project continuously after the CI build pass. However I have to use a publish profile to build the production web.config transform so that the deployed website will be using the production DB instead of dev DB. I have followed Scott Hanselman's blog post to add the MSBuild arguments in the CI build definition. My arguments are like this:
/p:DeployOnBuild=true /p:PublishProfile=[publish profile name] /p:AllowUntrustedCertificate=true /p:UserName=[credentials obtained from Azure Website portal] /p:Password=[from the portal as well]
It seems working, the deployed website is using production DB now.
Then I noticed that in the CI build definition under the Deployment section, there is one parameter called: Path to Deployment Settings. From this article, it says:
"The path to your .pubxml file for a website, relative to the root folder of the repo. Ignored for cloud services."
Which is exactly what I want. So I removed the MSBuild arguments, set the Path to Deployment Settings by select the pubxml file in the popup, and give it another try.
However, this nice and simple way doesn't work at all. Even if it is pointing to the same pubxml file, and both ways got green CI builds, the later one seems still use the default web.config not the transformed one after deployment.
So I am curious if anyone know what is the difference between the PublishProfile in MSBuild arguments and Path to Deployment Settings? Am I using the right way to do this?