I have a dll-type project that contains MSTest integration tests. On my machine the tests pass, and I want the same to happen on a CI server (I use TeamCity). But the tests fail, because I need to tweak some settings in app.config. This is why I was thinking to have a separate second app.config file that will hold the settings for CI server.
So I would like to have
/Sln /Proj app.config (I think this is required by VS) app.Release.config (This is a standalone independent config file)
Thus if I select Release configuration in build config on CI, I would like to use app.Release.config file instead of app.config
Problem
This doesn't seem to be straightforward for simple .dll type projects. For web projects, I can do web config transformations. I found a hack how to do these transformations for a dll type project, but I am not a big fan of hacks.
Question
What is a standard approach to tweak app.config files depending on build config for .NET projects (such as Debug, Release, ...)?