UPDATE 01/09/2012 - I started using Team Build for this project and didn't want to install the Windows SDK on my build machine. I did some research and stumbled across SlowCheetah, which is the way to go for this. There is also a blog post for getting this up and running with Team Build.
Visual Studio XML Transformations on the app.config files. Extending what was put in for the web guys. While I didn't figure any of it out, the following are great resources for getting it set up:
You can get the .targets file with instructions on how to use it from this article. Make sure you read the updates at the end of the article for the most up-to-date info.
You'll also need the information from Vishal Joshi's blog that describes how to set up everything in your project. Simple things like getting the .config files to nest under each other in the solution explorer bring me joy!
If you don't have it already, you'll need to install the .NET Framework 4.0 SDK since the transform stuff uses a tool from there.
Those articles have hints and links to get you going on the transformation syntax. It's pretty straight forward after you see a sample or two.
Good luck!