Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web.config transformation during Azure Website deployment from source control

I'm trying to get my source code to deploy automatically from source control (GitHub). Everything is working correctly with one exception - the web.config is not transforming correctly. I have the following web.config transformations set up:

Web.CloudLIVE.config
Web.CloudTEST.config

I am using Release configuration to build the projects in the solution. What I would like to do is specify in the App Settings in the Azure portal the correct web.config transform to apply ('CloudTEST' or 'CloudLIVE') and then have the web.config transformed correctly whenever source code is pushed to GitHub. Is it possible to do this?

like image 434
votive Avatar asked Jul 04 '14 14:07

votive


1 Answers

I found the answer to this almost immediately after I posted the question. It is possible by adding an app setting in the Configure section of the website in the Azure Portal.

The following setting will cause Kudu to transform the web.config correctly:

SCM_BUILD_ARGS    -p:PublishProfile=CloudTEST

Where CloudTEST is your web.config transform name.

This solution is documented here

like image 86
votive Avatar answered Oct 31 '22 11:10

votive