我创建了一个名为“Staging”的新配置,右键单击主“web.config”并选择“Add Config Transform” . 现在主“Web.config”文件下有一个“Web.Staging.Config”文件 .

在Visual Studio Team Services中,我将“Configuration”设置为“Staging” .

enter image description here

MSBuild参数是......

/ p:Configuration = Staging / P:DeployOnBuild = True / P:DeployTarget = MSDeployPublish /P:DeployIISAppPath=Path.Staging / P:AllowUntrustedCertificate = True / P:MSDeployPublishMethod = WMSvc / P:CreatePackageOnPublish = True / P:MsDeployServiceUrl = https://DOMAIN/MsDeploy.axd / P:UserName = * / P:Password = *

部署后,主Web.config尚未转换 .

我究竟做错了什么?这在我使用标准的“Debug”配置时有效,Visual Studio告诉我这是“主动”配置 .