Friday, May 09, 2014

Modify web.config files in compile F5 time, with the transformation

Add the following into the project file:
<target name="BeforeBuild"></target>
   <copy continueonerror="true" destinationfiles="Web.Base.config" sourcefiles="Web.config"></copy>
   <transformxml destination="Web.config" source="Web.Base.config" transform="Web.$(Configuration).config">
</transformxml>