问题
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