在.csproj文件中添加以下内容:
<Target Name="BeforeBuild">
<TransformXml Source="Web.config" Transform="Web.$(Configuration).config" Destination="Web.config" />
</Target>
在.csproj文件中添加以下内容:
<Target Name="BeforeBuild">
<TransformXml Source="Web.config" Transform="Web.$(Configuration).config" Destination="Web.config" />
</Target>
转载于:https://www.cnblogs.com/strugglepcx/p/6433432.html