diff options
author | Rob Mensching <rob@firegiant.com> | 2017-12-29 04:10:21 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-12-29 04:10:21 -0800 |
commit | 8d04e35f943507d7c6338f0cc7779aeeab862d23 (patch) | |
tree | 9ecb222db6b06a4b815fd9bb4ebed6e2aaf0fb44 /src | |
parent | 5524dd89431695bf9d710e694ec49401d3cecfde (diff) | |
download | wix-8d04e35f943507d7c6338f0cc7779aeeab862d23.tar.gz wix-8d04e35f943507d7c6338f0cc7779aeeab862d23.tar.bz2 wix-8d04e35f943507d7c6338f0cc7779aeeab862d23.zip |
New WixToolset.Core.TestPackage.nupkg for testing in other repos
Diffstat (limited to 'src')
-rw-r--r-- | src/WixToolset.Core.TestPackage/WixRunner.cs | 42 | ||||
-rw-r--r-- | src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj | 34 |
2 files changed, 76 insertions, 0 deletions
diff --git a/src/WixToolset.Core.TestPackage/WixRunner.cs b/src/WixToolset.Core.TestPackage/WixRunner.cs new file mode 100644 index 00000000..ca0a6fb8 --- /dev/null +++ b/src/WixToolset.Core.TestPackage/WixRunner.cs | |||
@@ -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 | } | ||
diff --git a/src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj b/src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj new file mode 100644 index 00000000..d2ba960b --- /dev/null +++ b/src/WixToolset.Core.TestPackage/WixToolset.Core.TestPackage.csproj | |||
@@ -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> | ||