aboutsummaryrefslogtreecommitdiff
path: root/src/test/CompileCoreTestExtensionWixlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/CompileCoreTestExtensionWixlib')
-rw-r--r--src/test/CompileCoreTestExtensionWixlib/CompileCoreTestExtensionWixlib.csproj13
-rw-r--r--src/test/CompileCoreTestExtensionWixlib/Program.cs33
2 files changed, 46 insertions, 0 deletions
diff --git a/src/test/CompileCoreTestExtensionWixlib/CompileCoreTestExtensionWixlib.csproj b/src/test/CompileCoreTestExtensionWixlib/CompileCoreTestExtensionWixlib.csproj
new file mode 100644
index 00000000..4bc1d02b
--- /dev/null
+++ b/src/test/CompileCoreTestExtensionWixlib/CompileCoreTestExtensionWixlib.csproj
@@ -0,0 +1,13 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- 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. -->
3
4<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFrameworks>net461</TargetFrameworks>
7 <OutputType>Exe</OutputType>
8 </PropertyGroup>
9
10 <ItemGroup>
11 <ProjectReference Include="..\..\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" />
12 </ItemGroup>
13</Project> \ No newline at end of file
diff --git a/src/test/CompileCoreTestExtensionWixlib/Program.cs b/src/test/CompileCoreTestExtensionWixlib/Program.cs
new file mode 100644
index 00000000..308ab8a2
--- /dev/null
+++ b/src/test/CompileCoreTestExtensionWixlib/Program.cs
@@ -0,0 +1,33 @@
1// 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.
2
3using System.Collections.Generic;
4using WixToolset.Core.TestPackage;
5
6namespace CompileCoreTestExtensionWixlib
7{
8 // We want to be able to test Core with extensions, but there's no easy way to build an extension without Tools.
9 // So we have this helper exe.
10 public class Program
11 {
12 public static void Main(string[] args)
13 {
14 var intermediateFolder = args[0];
15 var wixlibPath = args[1];
16
17 var buildArgs = new List<string>();
18 buildArgs.Add("build");
19 foreach (var path in args[2].Split(';'))
20 {
21 buildArgs.Add(path);
22 }
23 buildArgs.Add("-intermediateFolder");
24 buildArgs.Add(intermediateFolder);
25 buildArgs.Add("-o");
26 buildArgs.Add(wixlibPath);
27
28 var result = WixRunner.Execute(buildArgs.ToArray());
29
30 result.AssertSuccess();
31 }
32 }
33}