web.config file transform from command line

前端 未结 4 1673
暖寄归人
暖寄归人 2020-12-08 02:27

I have two build environments to target; Release and Staging. The Web.config looks like this:

     
    

        
4条回答
  •  独厮守ぢ
    2020-12-08 03:09

    Using Build transform with Jenkins, I also see that web.config does not transform, however, the actual transformation takes place when you do the deploy. I use an all in one msbuild command to do the build and deploy together.

    MSBuild MyProj.csproj /P:Configuration=Release /P:DeployOnBuild=True /P:DeployTarget=MsDeployPublish /P:MsDeployServiceUrl=https://your server/msdeploy.axd /P:AllowUntrustedCertificate=True /P:MSDeployPublishMethod=WMSvc /P:CreatePackageOnPublish=True /P:UserName=username /P:Password=password1 /P:DeployIISAppPath="Default Web Site or name of your website"

    Once it has run you can verify on the server that transformation takes place.

提交回复
热议问题