diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2019-02-13 20:13:57 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2019-02-13 20:16:48 -0600 |
commit | 391057093e45db2d4b2450bd236b9e1fc4cfd53c (patch) | |
tree | 0057f9e3626a594b0d2bc691c8ead8ea1283598d /src | |
parent | e0d1a8f6e54f2c573fc79fc442518758297b7d80 (diff) | |
download | wix-391057093e45db2d4b2450bd236b9e1fc4cfd53c.tar.gz wix-391057093e45db2d4b2450bd236b9e1fc4cfd53c.tar.bz2 wix-391057093e45db2d4b2450bd236b9e1fc4cfd53c.zip |
Add test for creating a Managed BA through mbahost.
Diffstat (limited to 'src')
-rw-r--r-- | src/Cpp.Build.props | 10 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/BootstrapperApplicationData.xml | bin | 0 -> 20128 bytes | |||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/EngineForTest.cpp | 45 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/EngineForTest.h | 63 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/MbaHostFixture.cpp | 70 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h | 30 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/WixToolset.BootstrapperCore.config | 26 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj | 91 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/packages.config | 14 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/precomp.cpp | 3 | ||||
-rw-r--r-- | src/test/WixToolsetTest.MbaHost/precomp.h | 15 |
11 files changed, 361 insertions, 6 deletions
diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 0e00132b..a90fec2c 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props | |||
@@ -11,6 +11,10 @@ | |||
11 | <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'=='15.0'"> | 11 | <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'=='15.0'"> |
12 | <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion> | 12 | <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion> |
13 | </PropertyGroup> | 13 | </PropertyGroup> |
14 | |||
15 | <PropertyGroup Condition=" '$(CLRSupport)'=='true' "> | ||
16 | <DisableSpecificCompilerWarnings>4564;4691</DisableSpecificCompilerWarnings> | ||
17 | </PropertyGroup> | ||
14 | 18 | ||
15 | <ItemDefinitionGroup> | 19 | <ItemDefinitionGroup> |
16 | <ClCompile> | 20 | <ClCompile> |
@@ -95,10 +99,4 @@ | |||
95 | <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary> | 99 | <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary> |
96 | </ClCompile> | 100 | </ClCompile> |
97 | </ItemDefinitionGroup> | 101 | </ItemDefinitionGroup> |
98 | <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' "> | ||
99 | <Link> | ||
100 | <KeyFile>$(LinkKeyFile)</KeyFile> | ||
101 | <DelaySign>$(LinkDelaySign)</DelaySign> | ||
102 | </Link> | ||
103 | </ItemDefinitionGroup> | ||
104 | </Project> | 102 | </Project> |
diff --git a/src/test/WixToolsetTest.MbaHost/BootstrapperApplicationData.xml b/src/test/WixToolsetTest.MbaHost/BootstrapperApplicationData.xml new file mode 100644 index 00000000..7c4169b1 --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/BootstrapperApplicationData.xml | |||
Binary files differ | |||
diff --git a/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp b/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp new file mode 100644 index 00000000..b2567a7b --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/EngineForTest.cpp | |||
@@ -0,0 +1,45 @@ | |||
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 | #include "precomp.h" | ||
4 | |||
5 | static HRESULT BAEngineLog( | ||
6 | __in BOOTSTRAPPER_ENGINE_CONTEXT* pContext, | ||
7 | __in BAENGINE_LOG_ARGS* pArgs, | ||
8 | __in BAENGINE_LOG_RESULTS* /*pResults*/ | ||
9 | ) | ||
10 | { | ||
11 | HRESULT hr = S_OK; | ||
12 | |||
13 | pContext->pfnLog(pArgs->wzMessage); | ||
14 | |||
15 | return hr; | ||
16 | } | ||
17 | |||
18 | HRESULT WINAPI EngineForTestProc( | ||
19 | __in BOOTSTRAPPER_ENGINE_MESSAGE message, | ||
20 | __in const LPVOID pvArgs, | ||
21 | __inout LPVOID pvResults, | ||
22 | __in_opt LPVOID pvContext | ||
23 | ) | ||
24 | { | ||
25 | HRESULT hr = S_OK; | ||
26 | BOOTSTRAPPER_ENGINE_CONTEXT* pContext = reinterpret_cast<BOOTSTRAPPER_ENGINE_CONTEXT*>(pvContext); | ||
27 | |||
28 | if (!pContext || !pvArgs || !pvResults) | ||
29 | { | ||
30 | ExitFunction1(hr = E_INVALIDARG); | ||
31 | } | ||
32 | |||
33 | switch (message) | ||
34 | { | ||
35 | case BOOTSTRAPPER_ENGINE_MESSAGE_LOG: | ||
36 | hr = BAEngineLog(pContext, reinterpret_cast<BAENGINE_LOG_ARGS*>(pvArgs), reinterpret_cast<BAENGINE_LOG_RESULTS*>(pvResults)); | ||
37 | break; | ||
38 | default: | ||
39 | hr = E_NOTIMPL; | ||
40 | break; | ||
41 | } | ||
42 | |||
43 | LExit: | ||
44 | return hr; | ||
45 | } \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MbaHost/EngineForTest.h b/src/test/WixToolsetTest.MbaHost/EngineForTest.h new file mode 100644 index 00000000..6058e67c --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/EngineForTest.h | |||
@@ -0,0 +1,63 @@ | |||
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 | HRESULT WINAPI EngineForTestProc( | ||
5 | __in BOOTSTRAPPER_ENGINE_MESSAGE message, | ||
6 | __in const LPVOID pvArgs, | ||
7 | __inout LPVOID pvResults, | ||
8 | __in_opt LPVOID pvContext | ||
9 | ); | ||
10 | |||
11 | typedef void(WINAPI *PFN_TEST_LOG_PROC)( | ||
12 | __in LPCWSTR sczMessage | ||
13 | ); | ||
14 | |||
15 | struct BOOTSTRAPPER_ENGINE_CONTEXT | ||
16 | { | ||
17 | PFN_TEST_LOG_PROC pfnLog; | ||
18 | }; | ||
19 | |||
20 | namespace WixToolsetTest | ||
21 | { | ||
22 | namespace MbaHost | ||
23 | { | ||
24 | namespace Native | ||
25 | { | ||
26 | using namespace System; | ||
27 | using namespace System::Collections::Generic; | ||
28 | using namespace System::Runtime::InteropServices; | ||
29 | |||
30 | public ref class EngineForTest | ||
31 | { | ||
32 | private: | ||
33 | delegate void LogDelegate(LPCWSTR); | ||
34 | LogDelegate^ _logDelegate; | ||
35 | List<String^>^ _messages; | ||
36 | |||
37 | void Log(LPCWSTR sczMessage) | ||
38 | { | ||
39 | String^ message = gcnew String(sczMessage); | ||
40 | System::Diagnostics::Debug::WriteLine(message); | ||
41 | _messages->Add(message); | ||
42 | } | ||
43 | public: | ||
44 | EngineForTest() | ||
45 | { | ||
46 | _logDelegate = gcnew LogDelegate(this, &EngineForTest::Log); | ||
47 | _messages = gcnew List<String^>(); | ||
48 | } | ||
49 | |||
50 | List<String^>^ GetLogMessages() | ||
51 | { | ||
52 | return _messages; | ||
53 | } | ||
54 | |||
55 | PFN_TEST_LOG_PROC GetTestLogProc() | ||
56 | { | ||
57 | IntPtr functionPointer = Marshal::GetFunctionPointerForDelegate(_logDelegate); | ||
58 | return static_cast<PFN_TEST_LOG_PROC>(functionPointer.ToPointer()); | ||
59 | } | ||
60 | }; | ||
61 | } | ||
62 | } | ||
63 | } \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MbaHost/MbaHostFixture.cpp b/src/test/WixToolsetTest.MbaHost/MbaHostFixture.cpp new file mode 100644 index 00000000..9328aacf --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/MbaHostFixture.cpp | |||
@@ -0,0 +1,70 @@ | |||
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 | #include "precomp.h" | ||
4 | |||
5 | namespace WixToolsetTest | ||
6 | { | ||
7 | namespace MbaHost | ||
8 | { | ||
9 | namespace Native | ||
10 | { | ||
11 | using namespace System; | ||
12 | using namespace Xunit; | ||
13 | |||
14 | public ref class MbaHostFixture | ||
15 | { | ||
16 | public: | ||
17 | [Fact] | ||
18 | void CanLoadManagedBootstrapperApplication() | ||
19 | { | ||
20 | HMODULE hBAModule = NULL; | ||
21 | PFN_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = NULL; | ||
22 | HRESULT hr = S_OK; | ||
23 | |||
24 | EngineForTest^ engine = gcnew EngineForTest(); | ||
25 | BOOTSTRAPPER_ENGINE_CONTEXT engineContext = { }; | ||
26 | engineContext.pfnLog = engine->GetTestLogProc(); | ||
27 | |||
28 | LogInitialize(::GetModuleHandleW(NULL)); | ||
29 | |||
30 | hr = LogOpen(NULL, L"MbaHostUnitTest", NULL, L"txt", FALSE, FALSE, NULL); | ||
31 | Assert::Equal(S_OK, hr); | ||
32 | |||
33 | BOOTSTRAPPER_COMMAND command = { }; | ||
34 | BOOTSTRAPPER_CREATE_ARGS args = { }; | ||
35 | BOOTSTRAPPER_CREATE_RESULTS results = { }; | ||
36 | |||
37 | args.cbSize = sizeof(BOOTSTRAPPER_CREATE_ARGS); | ||
38 | args.pCommand = &command; | ||
39 | args.pfnBootstrapperEngineProc = EngineForTestProc; | ||
40 | args.pvBootstrapperEngineProcContext = &engineContext; | ||
41 | args.qwEngineAPIVersion = MAKEQWORDVERSION(0, 0, 0, 1); | ||
42 | |||
43 | results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); | ||
44 | |||
45 | hBAModule = ::LoadLibraryExW(L"mbahost.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH); | ||
46 | Assert::NotEqual(NULL, (int)hBAModule); | ||
47 | |||
48 | pfnCreate = (PFN_BOOTSTRAPPER_APPLICATION_CREATE)::GetProcAddress(hBAModule, "BootstrapperApplicationCreate"); | ||
49 | Assert::NotEqual(NULL, (int)pfnCreate); | ||
50 | |||
51 | hr = pfnCreate(&args, &results); | ||
52 | Assert::Equal(S_OK, hr); | ||
53 | |||
54 | BA_ONSHUTDOWN_ARGS shutdownArgs = { }; | ||
55 | BA_ONSHUTDOWN_RESULTS shutdownResults = { }; | ||
56 | shutdownArgs.cbSize = sizeof(BA_ONSHUTDOWN_ARGS); | ||
57 | shutdownResults.action = BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER; | ||
58 | shutdownResults.cbSize = sizeof(BA_ONSHUTDOWN_RESULTS); | ||
59 | hr = results.pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &shutdownArgs, &shutdownResults, results.pvBootstrapperApplicationProcContext); | ||
60 | Assert::Equal(S_OK, hr); | ||
61 | |||
62 | List<String^>^ logMessages = engine->GetLogMessages(); | ||
63 | Assert::Equal(2, logMessages->Count); | ||
64 | Assert::Equal("Loading managed bootstrapper application.", logMessages[0]); | ||
65 | Assert::Equal("Shutdown,ReloadBootstrapper,0", logMessages[1]); | ||
66 | } | ||
67 | }; | ||
68 | } | ||
69 | } | ||
70 | } | ||
diff --git a/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h b/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h new file mode 100644 index 00000000..1dfd0d4d --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h | |||
@@ -0,0 +1,30 @@ | |||
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 TestManagedBootstrapperApplication : BootstrapperApplication | ||
14 | { | ||
15 | public: | ||
16 | virtual void Run() override | ||
17 | { | ||
18 | } | ||
19 | |||
20 | virtual void OnShutdown(ShutdownEventArgs^ e) override | ||
21 | { | ||
22 | String^ message = "Shutdown," + e->Action.ToString() + "," + e->HResult.ToString(); | ||
23 | this->Engine->Log(LogLevel::Standard, message); | ||
24 | } | ||
25 | }; | ||
26 | |||
27 | [assembly:BootstrapperApplication(TestManagedBootstrapperApplication::typeid)]; | ||
28 | } | ||
29 | } | ||
30 | } \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MbaHost/WixToolset.BootstrapperCore.config b/src/test/WixToolsetTest.MbaHost/WixToolset.BootstrapperCore.config new file mode 100644 index 00000000..b4c67a82 --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/WixToolset.BootstrapperCore.config | |||
@@ -0,0 +1,26 @@ | |||
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 | |||
5 | <configuration> | ||
6 | <configSections> | ||
7 | <sectionGroup name="wix.bootstrapper" type="WixToolset.BootstrapperCore.BootstrapperSectionGroup, WixToolset.BootstrapperCore"> | ||
8 | <section name="host" type="WixToolset.BootstrapperCore.HostSection, WixToolset.BootstrapperCore" /> | ||
9 | </sectionGroup> | ||
10 | </configSections> | ||
11 | <startup useLegacyV2RuntimeActivationPolicy="true"> | ||
12 | <supportedRuntime version="v4.0" /> | ||
13 | <supportedRuntime version="v2.0.50727" /> | ||
14 | </startup> | ||
15 | <wix.bootstrapper> | ||
16 | <!-- Example only. Use only if the startup/supportedRuntime above cannot discern supported frameworks. --> | ||
17 | <!-- | ||
18 | <supportedFramework version="v4\Client" /> | ||
19 | <supportedFramework version="v3.5" /> | ||
20 | <supportedFramework version="v3.0" /> | ||
21 | --> | ||
22 | |||
23 | <!-- Example only. Replace the host/@assemblyName attribute with assembly that implements BootstrapperApplication. --> | ||
24 | <host assemblyName="WixToolsetTest.MbaHost" /> | ||
25 | </wix.bootstrapper> | ||
26 | </configuration> | ||
diff --git a/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj b/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj new file mode 100644 index 00000000..557aaff0 --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj | |||
@@ -0,0 +1,91 @@ | |||
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 | <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')" /> | ||
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"> | ||
9 | <ProjectConfiguration Include="Debug|Win32"> | ||
10 | <Configuration>Debug</Configuration> | ||
11 | <Platform>Win32</Platform> | ||
12 | </ProjectConfiguration> | ||
13 | <ProjectConfiguration Include="Release|Win32"> | ||
14 | <Configuration>Release</Configuration> | ||
15 | <Platform>Win32</Platform> | ||
16 | </ProjectConfiguration> | ||
17 | </ItemGroup> | ||
18 | <PropertyGroup Label="Globals"> | ||
19 | <ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes> | ||
20 | <ProjectGuid>{8C131CB9-7B1C-4B06-A328-E69CE9EDC763}</ProjectGuid> | ||
21 | <RootNamespace>WixToolsetTest.MbaHost</RootNamespace> | ||
22 | <Keyword>ManagedCProj</Keyword> | ||
23 | <ConfigurationType>DynamicLibrary</ConfigurationType> | ||
24 | <PlatformToolset>v141</PlatformToolset> | ||
25 | <CharacterSet>Unicode</CharacterSet> | ||
26 | <CLRSupport>true</CLRSupport> | ||
27 | <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
28 | </PropertyGroup> | ||
29 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
30 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
31 | <PropertyGroup> | ||
32 | <ProjectAdditionalLinkLibraries></ProjectAdditionalLinkLibraries> | ||
33 | </PropertyGroup> | ||
34 | <ItemGroup> | ||
35 | <ClCompile Include="EngineForTest.cpp" /> | ||
36 | <ClCompile Include="MbaHostFixture.cpp" /> | ||
37 | <ClCompile Include="precomp.cpp"> | ||
38 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
39 | </ClCompile> | ||
40 | </ItemGroup> | ||
41 | <ItemGroup> | ||
42 | <ClInclude Include="EngineForTest.h" /> | ||
43 | <ClInclude Include="precomp.h" /> | ||
44 | <ClInclude Include="TestManagedBootstrapperApplication.h" /> | ||
45 | </ItemGroup> | ||
46 | |||
47 | <ItemGroup> | ||
48 | <None Include="packages.config" /> | ||
49 | <Content Include="BootstrapperApplicationData.xml" CopyToOutputDirectory="PreserveNewest" /> | ||
50 | <Content Include="WixToolset.BootstrapperCore.config" CopyToOutputDirectory="PreserveNewest" /> | ||
51 | </ItemGroup> | ||
52 | <ItemGroup> | ||
53 | <Reference Include="System" /> | ||
54 | <Reference Include="System.Core" /> | ||
55 | <Reference Include="xunit.abstractions"> | ||
56 | <HintPath>..\..\..\packages\xunit.abstractions.2.0.2\lib\net35\xunit.abstractions.dll</HintPath> | ||
57 | </Reference> | ||
58 | <Reference Include="xunit.assert"> | ||
59 | <HintPath>..\..\..\packages\xunit.assert.2.4.0\lib\netstandard2.0\xunit.assert.dll</HintPath> | ||
60 | </Reference> | ||
61 | <Reference Include="xunit.core"> | ||
62 | <HintPath>..\..\..\packages\xunit.extensibility.core.2.4.0\lib\net452\xunit.core.dll</HintPath> | ||
63 | </Reference> | ||
64 | <Reference Include="xunit.execution.desktop"> | ||
65 | <HintPath>..\..\..\packages\xunit.extensibility.execution.2.4.0\lib\net452\xunit.execution.desktop.dll</HintPath> | ||
66 | </Reference> | ||
67 | <Reference Include="WixToolset.BootstrapperCore"> | ||
68 | <HintPath>..\..\..\packages\WixToolset.BootstrapperCore.4.0.3\lib\net20\WixToolset.BootstrapperCore.dll</HintPath> | ||
69 | </Reference> | ||
70 | </ItemGroup> | ||
71 | <ItemGroup> | ||
72 | <ProjectReference Include="..\..\mbahost\mbahost.vcxproj"> | ||
73 | <Project>{12c87c77-3547-44f8-8134-29bc915cb19d}</Project> | ||
74 | </ProjectReference> | ||
75 | </ItemGroup> | ||
76 | <ItemGroup> | ||
77 | <Analyzer Include="..\packages\xunit.analyzers.0.10.0\analyzers\dotnet\cs\xunit.analyzers.dll" /> | ||
78 | </ItemGroup> | ||
79 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
80 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
81 | <PropertyGroup> | ||
82 | <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> | ||
83 | </PropertyGroup> | ||
84 | <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\xunit.core.2.4.0\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props'))" /> | ||
87 | <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'))" /> | ||
88 | <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'))" /> | ||
89 | </Target> | ||
90 | <Import Project="..\..\..\packages\xunit.core.2.4.0\build\xunit.core.targets" Condition="Exists('..\..\..\packages\xunit.core.2.4.0\build\xunit.core.targets')" /> | ||
91 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MbaHost/packages.config b/src/test/WixToolsetTest.MbaHost/packages.config new file mode 100644 index 00000000..c3b6551c --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/packages.config | |||
@@ -0,0 +1,14 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <packages> | ||
3 | <package id="xunit" version="2.4.0" targetFramework="net461" /> | ||
4 | <package id="xunit.abstractions" version="2.0.2" targetFramework="net461" /> | ||
5 | <package id="xunit.analyzers" version="0.10.0" targetFramework="net461" /> | ||
6 | <package id="xunit.assert" version="2.4.0" targetFramework="net461" /> | ||
7 | <package id="xunit.core" version="2.4.0" targetFramework="net461" /> | ||
8 | <package id="xunit.extensibility.core" version="2.4.0" targetFramework="net461" /> | ||
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" /> | ||
13 | <package id="WixToolset.DUtil" version="4.0.16" targetFramework="native" /> | ||
14 | </packages> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MbaHost/precomp.cpp b/src/test/WixToolsetTest.MbaHost/precomp.cpp new file mode 100644 index 00000000..37664a1c --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/precomp.cpp | |||
@@ -0,0 +1,3 @@ | |||
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 | #include "precomp.h" | ||
diff --git a/src/test/WixToolsetTest.MbaHost/precomp.h b/src/test/WixToolsetTest.MbaHost/precomp.h new file mode 100644 index 00000000..aa4b6ddc --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/precomp.h | |||
@@ -0,0 +1,15 @@ | |||
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 | |||
5 | #include <windows.h> | ||
6 | #include <msiquery.h> | ||
7 | |||
8 | #include "dutil.h" | ||
9 | #include "logutil.h" | ||
10 | |||
11 | #include "BootstrapperEngine.h" | ||
12 | #include "BootstrapperApplication.h" | ||
13 | |||
14 | #include "EngineForTest.h" | ||
15 | #include "TestManagedBootstrapperApplication.h" | ||