views:

169

answers:

1

Is there a way to automatically use a separate app.config when building in release mode?

In other words, I want to test with one app.config, and release with another.

Currently, I keep a separate copy called app.config.production, and manually overwrite bin\Release\Application.exe.config after building for release.

+3  A: 

Check out ScottGu Tip/Trick: Automating Dev, QA, Staging, and Production Web.Config Settings with VS 2005 and ScottH Managing Multiple Configuration File Environments with Pre-Build Events. You've got the best Scott's in the world on the problem. :)

JP Alioto