| 1 | <Project Sdk="Microsoft.Build.Traversal"> |
| 2 | <PropertyGroup> |
| 3 | <StagePublishX86>$(BaseIntermediateOutputPath)$(Configuration)\net472\x86\</StagePublishX86> |
| 4 | <StagePublishX64>$(BaseIntermediateOutputPath)$(Configuration)\net472\x64\</StagePublishX64> |
| 5 | <StagePublishDnc>$(BaseIntermediateOutputPath)$(Configuration)\net6.0\</StagePublishDnc> |
| 6 | |
| 7 | <PublishBuildFolder>$(PublishRoot)WixToolset.Sdk\build\</PublishBuildFolder> |
| 8 | <PublishHere>$(PublishRoot)WixToolset.Sdk\tools\net472\</PublishHere> |
| 9 | <PublishX86>$(PublishRoot)WixToolset.Sdk\tools\net472\x86\</PublishX86> |
| 10 | <PublishX64>$(PublishRoot)WixToolset.Sdk\tools\net472\x64\</PublishX64> |
| 11 | <PublishARM64>$(PublishRoot)WixToolset.Sdk\tools\net472\arm64\</PublishARM64> |
| 12 | <PublishDnc>$(PublishRoot)WixToolset.Sdk\tools\net6.0\</PublishDnc> |
| 13 | </PropertyGroup> |
| 14 | |
| 15 | <ItemGroup> |
| 16 | <ProjectReference Include="WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" Properties="TargetFramework=net472;PublishDir=$(StagePublishX86)WixToolset.BuildTasks" Targets="Publish" /> |
| 17 | <ProjectReference Include="WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" Properties="TargetFramework=net6.0;UseAppHost=false;PublishDir=$(StagePublishDnc)WixToolset.BuildTasks" Targets="Publish" /> |
| 18 | |
| 19 | <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net6.0;PublishDir=$(BaseOutputPath)$(Configuration)\publish\wix\" Targets="Publish" /> |
| 20 | |
| 21 | <!-- wix.exe doesn't need to filter any files so publish it straight into its final location --> |
| 22 | <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x86;PublishDir=$(PublishX86)" Targets="Publish" /> |
| 23 | <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x64;PublishDir=$(PublishX64)" Targets="Publish" /> |
| 24 | <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-arm64;PublishDir=$(PublishARM64)" Targets="Publish" /> |
| 25 | <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net6.0;UseAppHost=false;PublishDir=$(PublishDnc)" Targets="Publish" /> |
| 26 | </ItemGroup> |
| 27 | |
| 28 | <Target Name="CopyToFinalPublishFolder" AfterTargets="Build"> |
| 29 | <ItemGroup> |
| 30 | <From Include="$(StagePublishX86)\WixToolset.BuildTasks\*.*" Exclude="$(StagePublishx86)\WixToolset.BuildTasks\Microsoft.Build.*.dll" To="$(PublishHere)" /> |
| 31 | <From Include="$(StagePublishDnc)\WixToolset.BuildTasks\*.*" Exclude="$(StagePublishDnc)\WixToolset.BuildTasks\Microsoft.Build.*.dll" To="$(PublishDnc)" /> |
| 32 | </ItemGroup> |
| 33 | |
| 34 | <Copy SourceFiles="@(From)" |
| 35 | DestinationFiles="%(To)%(RecursiveDir)%(Filename)%(Extension)" |
| 36 | SkipUnchangedFiles="true" |
| 37 | UseHardlinksIfPossible="true" /> |
| 38 | </Target> |
| 39 | </Project> |