I\'m using web.config transformation as described in the below post in order to generate configs for different environments.
http://vishaljoshi.blogspot.com/2009/03/
In conjunction with xdt:Transform="Remove" use xdt:Transform="InsertIfMissing" in VS2012.
xdt:Transform="Remove"
xdt:Transform="InsertIfMissing"