aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj
blob: d446d3a142f4dab4231b7bbeab35cf374438346d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <IsPackable>false</IsPackable>
  </PropertyGroup>

  <PropertyGroup>
    <NoWarn>NU1701</NoWarn>
  </PropertyGroup>

  <PropertyGroup>
    <EarliestCoreMBAProjectPath>..\examples\EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath>
    <LatestCoreMBAProjectPath>..\examples\LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath>
    <WPFCoreMBAProjectPath>..\examples\WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath>
    <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath>
  </PropertyGroup>

  <ItemGroup>
    <Content Include="TestData\EarliestCoreMBA\FrameworkDependentBundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\EarliestCoreMBA\HarvestedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\EarliestCoreMBA\HarvestedTrimmedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\EarliestCoreMBA\SelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\EarliestCoreMBA\TrimmedSelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\FullFramework2MBA\Bundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\FullFramework4MBA\Bundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\LatestCoreMBA\FrameworkDependentBundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\LatestCoreMBA\HarvestedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\LatestCoreMBA\HarvestedTrimmedSCD.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\LatestCoreMBA\SelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\LatestCoreMBA\TrimmedSelfContainedBundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
    <Content Include="TestData\WPFCoreMBA\FrameworkDependentBundle.wxs" CopyToOutputDirectory="PreserveNewest"/>
  </ItemGroup>

  <Target Name="CopyExtensions" AfterTargets="Build">
    <Copy DestinationFolder="$(OutputPath)" SourceFiles="@(WixExtension)" />
  </Target>

  <ItemGroup>
    <CoreMBAProject Include="$(EarliestCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.EarliestCoreMBA</PublishPath>
    </CoreMBAProject>
    <CoreMBAProject Include="$(LatestCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.LatestCoreMBA</PublishPath>
    </CoreMBAProject>
    <CoreMBAProject Include="$(WPFCoreMBAProjectPath)">
      <PublishPath>$(MBAPublishPath)Example.WPFCoreMBA</PublishPath>
      <SkipSCD>true</SkipSCD>
      <SkipTrimmedSCD>true</SkipTrimmedSCD>
    </CoreMBAProject>
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="$(EarliestCoreMBAProjectPath)" />
    <ProjectReference Include="$(LatestCoreMBAProjectPath)" />
    <ProjectReference Include="$(WPFCoreMBAProjectPath)" />
    <ProjectReference Include="..\examples\FullFramework2MBA\Example.FullFramework2MBA.csproj" />
    <ProjectReference Include="..\examples\FullFramework4MBA\Example.FullFramework4MBA.csproj" />
    <ProjectReference Include="..\examples\TestEngine\Example.TestEngine.vcxproj" />
    <ProjectReference Include="..\..\wixext\WixToolset.Bal.wixext.csproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
    <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" />
    <PackageReference Include="WixToolset.Core.WindowsInstaller" Version="4.0.*" />
    <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
    <PackageReference Include="xunit" Version="2.4.1" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
  </ItemGroup>

  <Target Name="PublishExamples" AfterTargets="Build">
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipFDD)'==''" />
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x86 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipSCD)'==''" />
    <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x86 -c $(Configuration) --self-contained true -p:PublishTrimmed=true "%(CoreMBAProject.Identity)"'
          Condition="'%(CoreMBAProject.SkipTrimmedSCD)'==''" />
  </Target>
</Project>