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