【问题标题】:Appveyor deploy to Azure cloud service with Web.config transformAppveyor 使用 Web.config 转换部署到 Azure 云服务
【发布时间】:2015-08-31 11:27:25
【问题描述】:

如何配置在部署到 Azure 云服务时使用哪个 Web.config?

我有两个文件(Web.config 和 Web.Staging.config)如何配置以使用 Web.Staging.config 转换 Web.config?

我会换个问题:在 AppVeyor 构建和部署过程中有一个命令链接:

"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" "C:\projects\xxxxxxxxx\xxxxxxxx.AzureCloudService\xxxxxxxxxxx.AzureCloudService.ccproj" /p:Configuration="**Release**" /p:Platform="AnyCPU" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /t:Publish /p:PublishDir=C:\Users\appveyor\AppData\Local\Temp\1\th712xjsl2\

在该命令中,有一个名为 Configuration 的参数,它有一个固定的“Release”。
如何将此参数更改为其他配置?
AppVeyor 设置或 Visual Studio 中是否有方法?

【问题讨论】:

    标签: web.config-transform appveyor


    【解决方案1】:

    Web.config 转换在创建 Azure 云服务包时运行,并由解决方案配置控制。

    但是,由于云服务包已包含转换后的 web.config,因此您无法在部署期间在不同的 web.config 之间进行选择。

    这篇博文描述了如何在部署时更改 Azure 云服务配置的好方法:https://blogs.endjin.com/2015/03/using-a-different-new-relic-application-name-per-environment-with-azure-cloud-services/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-25
      • 2015-07-03
      • 2014-12-13
      • 1970-01-01
      • 2019-01-18
      • 2013-08-19
      • 2020-09-22
      • 1970-01-01
      相关资源
      最近更新 更多