New WixToolset.Core.TestPackage.nupkg for testing in other repos
Rob Mensching committed
Dec 29, 2017 at 04:10 UTC
8d04e35f943507d7c6338f0cc7779aeeab862d23
3 files changed
+77
appveyor.cmd
+1
@@ -11,6 +11,7 @@ dotnet publish -c Release -o %_P%\net461 -r win-x86 src\light
11
dotnet publish -c Release -o %_P%\net461 -r win-x86 src\WixToolset.BuildTasks
12
13
dotnet pack -c Release src\WixToolset.Core.InternalPackage
14
+dotnet pack -c Release src\WixToolset.Core.TestPackage
15
16
@popd
17
@endlocal
src/WixToolset.Core.TestPackage/WixRunner.cs
new
+42
@@ -0,0 +1,42 @@
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
+
3
+namespace WixToolset.Core.TestPackage
4
+{
5
+ using System.Collections.Generic;
6
+ using WixToolset.Data;
7
+ using WixToolset.Extensibility;
8
+
9
+ public static class WixRunner
10
+ {
11
+ public static int Execute(string[] args, out List<Message> messages)
12
+ {
13
+ var listener = new TestListener();
14
+
15
+ var program = new Program();
16
+ var result = program.Run(new WixToolsetServiceProvider(), listener, args);
17
+
18
+ messages = listener.Messages;
19
+
20
+ return result;
21
+ }
22
+
23
+ private class TestListener : IMessageListener
24
+ {
25
+ public List<Message> Messages { get; } = new List<Message>();
26
+
27
+ public string ShortAppName => "TEST";
28
+
29
+ public string LongAppName => "Test";
30
+
31
+ public void Write(Message message)
32
+ {
33
+ this.Messages.Add(message);
34
+ }
35
+
36
+ public void Write(string message)
37
+ {
38
+ this.Messages.Add(new Message(null, MessageLevel.Information, 0, message));
39
+ }
40
+ }
41
+ }
42
+}
src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj
new
+34
@@ -0,0 +1,34 @@
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
+ <TargetFramework>netcoreapp2.0</TargetFramework>
7
+ <Description>Internal WiX Toolset Test Package</Description>
8
+ </PropertyGroup>
9
+
10
+ <ItemGroup>
11
+ <ProjectReference Include="..\wix\wix.csproj" IncludeAssets="true" />
12
+ <ProjectReference Include="..\WixToolset.Core\WixToolset.Core.csproj" IncludeAssets="true" />
13
+ <ProjectReference Include="..\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj" IncludeAssets="true" />
14
+ <ProjectReference Include="..\WixToolset.Core.WindowsInstaller\WixToolset.Core.WindowsInstaller.csproj" IncludeAssets="true" />
15
+ </ItemGroup>
16
+
17
+ <!-- This is a workaround until https://github.com/NuGet/Home/issues/3891 is resolved -->
18
+ <ItemGroup>
19
+ <_PackageFiles Include="$(OutputPath)\wix.dll" BuildAction="None" PackagePath="lib\$(TargetFramework)\" />
20
+ <_PackageFiles Include="$(OutputPath)\WixToolset.Core.dll" BuildAction="None" PackagePath="lib\$(TargetFramework)\" />
21
+ <_PackageFiles Include="$(OutputPath)\WixToolset.Core.Burn.dll" BuildAction="None" PackagePath="lib\$(TargetFramework)\" />
22
+ <_PackageFiles Include="$(OutputPath)\WixToolset.Core.WindowsInstaller.dll" BuildAction="None" PackagePath="lib\$(TargetFramework)\" />
23
+ </ItemGroup>
24
+
25
+ <ItemGroup>
26
+ <PackageReference Include="WixToolset.Data" Version="4.0.*" />
27
+ <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" />
28
+ <PackageReference Include="WixToolset.Core.Native" Version="4.0.*" />
29
+ </ItemGroup>
30
+
31
+ <ItemGroup>
32
+ <PackageReference Include="Nerdbank.GitVersioning" Version="2.0.41" PrivateAssets="all" />
33
+ </ItemGroup>
34
+</Project>