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>
<copy continueonerror="true" destinationfiles="Web.Base.config" sourcefiles="Web.config"></copy>
<transformxml destination="Web.config" source="Web.Base.config" transform="Web.$(Configuration).config">
</transformxml>