Merging multiple config files RRS feed

  • Question

  • User78322712 posted

    Hi, I have the following config files in my C:\Configs directory

    1. web.enviroment.config
    2. web.dev.config
    3. web.production.config

    web.environment.config just contains this <environment>dev<environment> which can be change from dev to production depending on which config file I want to merge with the main App.config at runtime. How do I make this merge happen, that's either merging from web.dev.config or web.production.config base on the value is picks from <environment>dev<environment>. A sample code will be much appreciated.

    I am taking this approach because we have quite a lot of developers working on the same project and I don't want anyone stepping on each others toes.

    Thursday, July 12, 2012 6:02 PM