@joebigelow / wix-1 / commits / 1144983d

WIXFEAT:3815 - Update mbahost test for BootstrapperApplicationFactoryAttribute.

Sean Hall committed Feb 15, 2019 at 19:08 UTC 1144983d580524f1e22e0ddd2416955cda8063d2
5 files changed +37 -6
src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h
+6 -2
@@ -13,6 +13,12 @@ namespace Native
13 public ref class TestManagedBootstrapperApplication : BootstrapperApplication
14 {
15 public:
16 + TestManagedBootstrapperApplication(WixToolset::BootstrapperCore::Engine^ engine, WixToolset::BootstrapperCore::Command command)
17 + : BootstrapperApplication(engine, command)
18 + {
19 +
20 + }
21 +
22 virtual void Run() override
23 {
24 }
@@ -23,8 +29,6 @@ namespace Native
29 this->Engine->Log(LogLevel::Standard, message);
30 }
31 };
26 -
27 - [assembly:BootstrapperApplication(TestManagedBootstrapperApplication::typeid)];
32 }
33 }
34 }
\ No newline at end of file
src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplicationFactory.h new
+25
@@ -0,0 +1,25 @@
1 +#pragma once
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 +namespace WixToolsetTest
5 +{
6 +namespace MbaHost
7 +{
8 +namespace Native
9 +{
10 + using namespace System;
11 + using namespace WixToolset::BootstrapperCore;
12 +
13 + public ref class TestManagedBootstrapperApplicationFactory : public BaseBootstrapperApplicationFactory
14 + {
15 + protected:
16 + virtual IBootstrapperApplication^ Create(Engine^ engine, Command% command) override
17 + {
18 + return gcnew TestManagedBootstrapperApplication(engine, command);
19 + }
20 + };
21 +
22 + [assembly:BootstrapperApplicationFactory(TestManagedBootstrapperApplicationFactory::typeid)];
23 +}
24 +}
25 +}
\ No newline at end of file
src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj
+4 -3
@@ -2,7 +2,7 @@
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 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 <Import Project="..\..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props" Condition="Exists('..\..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props')" />
5 - <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props')" />
5 + <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.4.0.4\build\WixToolset.BootstrapperCore.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.4.0.4\build\WixToolset.BootstrapperCore.props')" />
6 <Import Project="..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props" Condition="Exists('..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props')" />
7 <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props')" />
8 <ItemGroup Label="ProjectConfigurations">
@@ -42,6 +42,7 @@
42 <ClInclude Include="EngineForTest.h" />
43 <ClInclude Include="precomp.h" />
44 <ClInclude Include="TestManagedBootstrapperApplication.h" />
45 + <ClInclude Include="TestManagedBootstrapperApplicationFactory.h" />
46 </ItemGroup>
47
48 <ItemGroup>
@@ -65,7 +66,7 @@
66 <HintPath>..\..\..\packages\xunit.extensibility.execution.2.4.0\lib\net452\xunit.execution.desktop.dll</HintPath>
67 </Reference>
68 <Reference Include="WixToolset.BootstrapperCore">
68 - <HintPath>..\..\..\packages\WixToolset.BootstrapperCore.4.0.3\lib\net20\WixToolset.BootstrapperCore.dll</HintPath>
69 + <HintPath>..\..\..\packages\WixToolset.BootstrapperCore.4.0.4\lib\net20\WixToolset.BootstrapperCore.dll</HintPath>
70 </Reference>
71 </ItemGroup>
72 <ItemGroup>
@@ -82,7 +83,7 @@
83 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
84 </PropertyGroup>
85 <Error Condition="!Exists('..\..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BalUtil.4.0.4\build\WixToolset.BalUtil.props'))" />
85 - <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.4.0.3\build\WixToolset.BootstrapperCore.props'))" />
86 + <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.4.0.4\build\WixToolset.BootstrapperCore.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.4.0.4\build\WixToolset.BootstrapperCore.props'))" />
87 <Error Condition="!Exists('..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props'))" />
88 <Error Condition="!Exists('..\..\..\packages\xunit.core.2.4.0\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\xunit.core.2.4.0\build\xunit.core.targets'))" />
89 <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props'))" />
src/test/WixToolsetTest.MbaHost/packages.config
+1 -1
@@ -9,6 +9,6 @@
9 <package id="xunit.extensibility.execution" version="2.4.0" targetFramework="net461" />
10 <package id="xunit.runner.visualstudio" version="2.4.0" targetFramework="net461" />
11 <package id="WixToolset.BalUtil" version="4.0.4" targetFramework="native" />
12 - <package id="WixToolset.BootstrapperCore" version="4.0.3" targetFramework="net461" />
12 + <package id="WixToolset.BootstrapperCore" version="4.0.4" targetFramework="net461" />
13 <package id="WixToolset.DUtil" version="4.0.16" targetFramework="native" />
14 </packages>
\ No newline at end of file
src/test/WixToolsetTest.MbaHost/precomp.h
+1
@@ -13,3 +13,4 @@
13
14 #include "EngineForTest.h"
15 #include "TestManagedBootstrapperApplication.h"
16 +#include "TestManagedBootstrapperApplicationFactory.h"