I have a web service project where I have one main web.config file and then different environment specific files as well like web.Staging.config/web.QE.config etc. Now, I am following this: http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx to add a prebuild event to my project to copy the configuration specific config file to the main web.config file but the problem is, it copies it without transforming and hence resulting into something like below:
<add key="somekey" value="Development" xdt:Transform="Replace" xdt:Locator="Match(key)"/>
My question is, is there a way to keep the transformed config files ready to be copied while building the project?