I\'m a huge fan of the addition of web.config transformations in Visual Studio 2010. See also Scott Hanselman\'s recent talk at MIX2011.
What sucks is that this function
I realize you already have an answer, but I stumbled across SlowCheetah this morning which is the best implementation I've seen to date. There is also a blog post on getting this running from a CI server.