Convert Web.config during deployment of an Azure website from a management source

I am trying to get the source code for automatic deployment from the source control (GitHub). Everything works correctly with one exception - web.config does not convert correctly. I have the following web.config conversions installed:

Web.CloudLIVE.config
Web.CloudTEST.config

I am using the Release configuration to create projects in the solution. What I would like to do is to specify in the application settings on the Azure portal the correct web.config conversion to apply ("CloudTEST" or "CloudLIVE"), and then correctly convert web.config whenever the source code is ported to GitHub. Can this be done?

+8
asp.net-mvc azure
source share
1 answer

I found the answer to this almost immediately after I posted the question. This can be added by adding the application settings in the "Settings" section of the website on the Cote d'Azur.

The following parameter will force Kudu to properly convert web.config:

SCM_BUILD_ARGS -p:PublishProfile=CloudTEST 

Where CloudTEST is your web.config conversion name.

This solution is documented here.

+14
source share

All Articles