aboutsummaryrefslogtreecommitdiff
path: root/src/test/Example.Extension/Example.Extension.csproj
blob: d7a3b729e4ec64ca4dc2d519194065cda27be635 (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
<?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>netcoreapp2.1</TargetFramework>
    <IsPackable>false</IsPackable>
    <DebugType>embedded</DebugType>
    <CompileWixlibDllPath>$(OutputPath)netcoreapp2.1\CompileCoreTestExtensionWixlib.dll</CompileWixlibDllPath>
  </PropertyGroup>

  <ItemGroup>
    <!-- Try to hack around VS up-to-date detection -->
    <Content Include="$(CompileWixlibDllPath)" CopyToOutputDirectory="PreserveNewest">
      <Visible>false</Visible>
    </Content>
    <Content Include="Data\example.wxs" CopyToOutputDirectory="PreserveNewest">
      <Visible>false</Visible>
    </Content>
    <ExtensionWxs Include="Data\example.wxs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\CompileCoreTestExtensionWixlib\CompileCoreTestExtensionWixlib.csproj" />
  </ItemGroup>

  <Target Name="SetExtensionWixlib">
    <PropertyGroup>
      <WixlibPath>$(IntermediateOutputPath)Example.wixlib</WixlibPath>
    </PropertyGroup>

    <ItemGroup>
      <EmbeddedResource Include="$(WixlibPath)" />
    </ItemGroup>
  </Target>

  <Target Name="BuildExtensionWixlib" AfterTargets="ResolveProjectReferences" DependsOnTargets="ResolveProjectReferences;SetExtensionWixlib" Inputs="@(ExtensionWxs);$(CompileWixlibDllPath)" Outputs="$(WixlibPath)">
    <Exec Command='dotnet $(CompileWixlibDllPath) "$(IntermediateOutputPath) " "$(WixlibPath)" "@(ExtensionWxs)"' />
  </Target>
</Project>