<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-task-reference
******************************************************************************
** CustomWebPublish Build Properties
******************************************************************************
-->
<PropertyGroup>
<BuildDependsOn>
$(BuildDependsOn);
CustomWebPublish;
</BuildDependsOn>
</PropertyGroup>
<Target Name="CustomWebPublish">
<Message Text="Publishing Web Application '$(AssemblyName)'..." Importance="high" />
<CreateItem Include="$(OutputPath)*">
<Output TaskParameter="Include" ItemName="Binaries"/>
</CreateItem>
<Copy SourceFiles="@(Binaries)" DestinationFolder="$(OutputPath)Publish\bin" />
<Copy SourceFiles="@(Content)" DestinationFolder="$(OutputPath)Publish\%(Content.RelativeDir)" />
<Copy SourceFiles="Global.asax.cs" DestinationFolder="$(OutputPath)Publish" Condition="Exists('Global.asax.cs')"/>
<TransformXml Source="Web.config" Transform="$(ProjectConfigTransformFileName)" Destination="$(OutputPath)Publish\%(Content.RelativeDir)Web.config" />
<CreateItem Include="$(OutputPath)x64\*;$(OutputPath)x86\*" Condition="Exists('$(OutputPath)x64') Or Exists('$(OutputPath)x86')">
<Output TaskParameter="Include" ItemName="NativeBinaries"/>
</CreateItem>
<Copy SourceFiles="@(NativeBinaries)" DestinationFolder="$(OutputPath)Publish\%(NativeBinaries.RelativeDir)" Condition="Exists('$(OutputPath)x64') Or Exists('$(OutputPath)x86')"/>
<Message Text="Successfully published Web Application '$(AssemblyName)' to '$(OutputPath)Publish'" Importance="high" />
</Target>
</Project>
Comments
0 B
|👍
/👎