asp.net - Web 配置转换不适用于 Visual Studio Online、VS2013 和 Azure

标签 asp.net azure continuous-integration azure-devops web.config-transform

我有一个 MVC5 网站,使用 Visual Studio Online (TFS) 的持续集成成功地将暂存和生产版本部署到 Azure。

我关注了这篇博文
Continuous Delivery to Azure Websites with git using custom deployment script

我什至已将构建所需的构建添加到我的发布配置文件中。即。
stagingbuild | any cpu .

note: this was not mentioned in the above mentioned blog post.

使用 VS2013 构建,站点部署正常,但配置未转换。我只是得到默认的 web.config设置,而不是来自 web.staging.config 的转换设置等等

note: I am only trying to transform one appSetting at the moment to get it working

我完全理解如何编写转换,所以我不认为这是一个问题,当我在 VS2013 中预览转换时,它们会在预览器窗口中进行转换。

note: I am not publishing directly from VS but committing my changes to repo and continuous integration kicks in from my Visual Studio Online repo.

最佳答案

尝试:

  • 团队资源管理器中打开构建
  • 编辑构建的构建定义
  • 设置流程 > 构建 > 配置 > 任何 CPU|发布 或任何其他配置/CPU 组合。

enter image description here

关于asp.net - Web 配置转换不适用于 Visual Studio Online、VS2013 和 Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24500203/

相关文章:

azure - 如何通过 docker CLI/quickstart 终端创建 Azure VM 并配置容器以使用 Azure 文件存储?

svn - Jenkins - 将 Subversion 修订从提升构建传递到作业

git - 推送代码时自动构建 VSTS

asp.net - 在母版页内的无序列表中找到转发器?

c# - asp.net缓存多线程锁webparts

javascript - asp.net 中嵌套元素的 jQuery ID 选择器?

python - VS Code Azure 部署 Python Http 触发器功能失败 - 找不到 GLIB_2.27

python - 为 CI 预先安装依赖项的 Docker 镜像

git - gerrit中的按钮 "Abandon Change"到底是什么?

c# - div 中的滚动位置与母版页