How to update miscelleneous config file which is deployed in Azure Cloud Service

rajindersingh's Avatar


20 Mar, 2015 02:54 AM

What is the best way to update a misc config file like log4net.config, loggly.user.config which are deployed with my azure cloud service.
i define cloud service configuration files per environment so I don't need to transform anything.
But I need to find a way to transform a random config file where I need to change a setting or two.

  1. Support Staff 1 Posted by Feodor Fitsner on 20 Mar, 2015 06:21 AM

    Feodor Fitsner's Avatar

    Well, if it's Azure cloud service and those log4net.config and loggly.user.config are inside cloud service package there is no way to update them during the deployment. They should be updated during the build before cloud service package created.

  2. 2 Posted by rajindersingh on 22 Mar, 2015 05:42 PM

    rajindersingh's Avatar

    I am trying to figure out how this will work. Before I ran into this issue I was able to create a build just once and deploy the same build to various environments.
    If I have to change the config files before/during the build it will mean I have to create different appveyor projects to deploy to various environments. This also introduces the risk of somebody checking in code that is not in a lower environment.

    I do have the option to merge these config files into my app.config or web.config files.
    Will that help in any way?

    I hope somebody can share how they are handling this type of situation.

  3. Support Staff 3 Posted by Feodor Fitsner on 23 Mar, 2015 06:44 AM

    Feodor Fitsner's Avatar
  4. 4 Posted by rajindersingh on 23 Mar, 2015 07:35 PM

    rajindersingh's Avatar

    I will use similar approach but my solution will be easier. I will most likely include all config files in my deployment and use this type of powershell script to copy the appropriate file.

    So I will have, loggly.test.user.config etc.
    Powershell script will read the ENV value in cloud configuration file and copy to loggly.user.config.

    Thanks for finding this.

  5. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:54 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac