The goal is to have TFS build and deploy 2+ different configurations, and have the web.config transform files include the intended content in their output. This in an ASP.NE
Here's what I've been using. The current TransformXml task has a bug where it leaves files open. Read more here.
You can call this task and deploy for each configuration you're working with.
<_tempSourceFile>$([System.IO.Path]::GetTempFileName())
<_tempTransformFile>$([System.IO.Path]::GetTempFileName())