The new Web Deployment Projects holds the promise of making deployment of web apps a doddle, and includes neat functionality to replace sections of web.config with versions for your live deployment.
See ScottGu's post here for details
It still has lots of benefits, however in the current release it seems the web.config replacements don't seem to work with sections other than connectionStrings, at least that was my experience.
However since the project is based on MSBuild you can easily customise the experience. Right click the deployment project and select "Open Project File" to get to the MSBuild config. Then make the changes you want. In my case I reverted to having a full live.config file as well as web.config and in deployment I replace web.config with live.config using the following:
<Target Name="AfterBuild">
<Copy SourceFiles="$(MSBuildProjectDirectory)\Release\live.config" DestinationFiles="$(MSBuildProjectDirectory)\Release\web.config"/>
<Delete Files="$(MSBuildProjectDirectory)\Release\live.config"/>
</Target>
HTH
Ian
Comments are disabled for this blog - but please feel free to comment via the contact page