Web config transforms not working with Visual Studio online, VS2013 and Azure

感情迁移 提交于 2019-12-10 13:55:58

问题


I have an MVC5 website successfully deploying a staging and production release to Azure using continuous integration from Visual Studio Online (TFS).

I have followed this blog post
Continuous Delivery to Azure Websites with git using custom deployment script

I have even added the build that is required to build to my publish profiles. ie.
stagingbuild | any cpu.

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

The sites deploy ok using by VS2013 build but the configs are not transformed. I just get the default web.config settings and not the transformed ones from web.staging.config etc.

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

I totally understand how to write transforms so I don't think this is an issue and when I preview my transforms in VS2013 they transform in the previewer window.

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.


回答1:


Try:

  • Open Builds in Team Explorer
  • Edit Build Definition of your build
  • Set Process > Build > Configurations > Any CPU|Release or any other configuration/CPU combo.



来源:https://stackoverflow.com/questions/24500203/web-config-transforms-not-working-with-visual-studio-online-vs2013-and-azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!