May 14, 2007

Single config file - multiple deployment environments (i.e. dev, qa, prod)

A common problem most application developers face at one time or another is managing the deployment of the environment specific configuration elements their application depends on.  Most often these elements include items like connection strings, file paths or other settings the application requires access to during runtime.  I recently tackled this problem and came up with a solution that seems to work pretty well (we have been using it for the past 4 months without any issues) and fits in great with our automated build enviornment.  Download code (http://mattberseth.com/downloads/managing_environment_config_settings.zip) for this article. My approach was pretty simple.  I wanted the build process to substitute all of the environment specific config settings while it was making the build.  So if I was doing a regular build at my desk, Visual Studio would automatically use the 'dev' environment settings, but when the automated build server did a 'qa' or 'prod' build, the correct settings would be applied here as well.  1.  First I identified...

Comments (4) | TrackBacks (1)

This Blog

  • Email Me
  • RSS
  • Atom
  • Entries - 102
  • Comments - 1276
  • Recent Comments

    • Chau wrote: Matt, I know its wrong to ask? Do you have black and gray version of the images? If would really h...
    • thombcoroemar wrote: Hi. Very interesting site! Thanks!...
    • ntulip wrote: i've followed your example and it seems that it doesn't work when your controls which expose the met...
    • Dave wrote: Anyone figure out the masterpage issue?...
    • rayzal wrote: Nice! i like it so much. Anybody here knows how to do it in PHP? Really appreciate any help :) thnks...
    • vitta wrote: Hi Matt.. I have the smillar requirement on navigating tabs on previous and next buttons. But I am...
    • Kabir wrote: Hi Matt I have been trying to implement this modal edit interface and i have been able to successful...
    • Gustavo Camps wrote: Excellent Blog!!!! is it possible to add Keyboard Navigation funcionality to vs2008 Lisview?...