AppHarbor Web.config transforms not being applied

本小妞迷上赌 提交于 2019-12-18 07:37:42

问题


I am developing an application in ServiceStack and am trying to sort out deployment on AppHarbor, however for some reason my web.config transforms are not being applied.

I had originally a Web.AppHarbor.config file and changed the Environment Setting to "AppHarbor" - once this failed to work after several updates, I gave up and changed the Environment setting to "Release" and copied the desired transformations into the Web.Release.Config file.

App gets deployed OK but config settings do not reflect the values in the transform file (I verify this by login on with twitter and seeing the callback url for Twitter Auth still tries to redirect me to localhost, which is one of the settings I change in my transform file)

I have also tried the transform tester tool and all works as expected.

Manually publishing the web application to a local folder correctly applies the transformations according to the selected configuration

Does anyone have this working? Is there something obvious I'm missing?

Thanks


回答1:


It sounds like the Web.Release.config file is not included in the build output. You need to set the Build Action attribute to Content to include it in the build output.

You can confirm whether the file is included in the output by downloading the build from the log page.




回答2:


I stumbled across this post because I was seeing the same lack of action myself. Upon closer inspection (about 15 times that is) of my Web.Release.config I realized one of the nodes in my config file was not marked xdt:Transform="Replace". Unsurprisingly it did nothing when deployed.



来源:https://stackoverflow.com/questions/14739099/appharbor-web-config-transforms-not-being-applied

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