Config Transformation Tool: Using XDT Transformation
XDT Transformation is a new feature of ASP.NET 4.0 named Web.Config Transformation.
Scott Guthrie: "In most real-world deployment scenarios, the web.config file you use for development is different than the one you use for production deployment. Typically you want to change environment settings like database connection-strings, making sure debug is turned off, and enabling custom errors so that end-users (and hackers) don’t see the internals of your application."
But the chief problem of this feature - is working only with web.config files.
I investigated this problem, and wrote Config Transformation Tool, which gives opportunity to use XDT Transformation Syntax like at Deployment Web Application Project for any files. This tool is very easy, it just run msbuild task, which do this transformation. Read more...