aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-05-03 15:55:48 -0700
committerRob Mensching <rob@firegiant.com>2021-05-03 15:55:48 -0700
commitba7bab476501c16e437b0aee71c1be02c3dda176 (patch)
tree814fba485c29a7dfe1adb396169e27ed641ef9a3 /src/test
parent14987a72cc1a3493ca8f80693d273352fc314bd9 (diff)
downloadwix-ba7bab476501c16e437b0aee71c1be02c3dda176.tar.gz
wix-ba7bab476501c16e437b0aee71c1be02c3dda176.tar.bz2
wix-ba7bab476501c16e437b0aee71c1be02c3dda176.zip
Move Bal.wixext into ext
Diffstat (limited to 'src/test')
-rw-r--r--src/test/WixToolsetTest.Bal/BalExtensionFixture.cs133
-rw-r--r--src/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs12
-rw-r--r--src/test/WixToolsetTest.Bal/TestData/Overridable/Bundle.wxs13
-rw-r--r--src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs12
-rw-r--r--src/test/WixToolsetTest.Bal/TestData/WixStdBa/Data/test.msibin32768 -> 0 bytes
-rw-r--r--src/test/WixToolsetTest.Bal/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs12
-rw-r--r--src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj43
-rw-r--r--src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject5
-rw-r--r--src/test/WixToolsetTest.ManagedHost/DncHostFixture.cs209
-rw-r--r--src/test/WixToolsetTest.ManagedHost/MbaHostFixture.cs94
-rw-r--r--src/test/WixToolsetTest.ManagedHost/README.md5
-rw-r--r--src/test/WixToolsetTest.ManagedHost/TestEngine.cs74
-rw-r--r--src/test/WixToolsetTest.ManagedHost/TestEngineResult.cs12
-rw-r--r--src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj25
-rw-r--r--src/test/examples/Directory.Build.props6
-rw-r--r--src/test/examples/Directory.Build.targets6
-rw-r--r--src/test/examples/EarliestCoreBundleFDD/EarliestCoreBundleFDD.wixproj2
-rw-r--r--src/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs16
-rw-r--r--src/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj10
-rw-r--r--src/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs11
-rw-r--r--src/test/examples/EarliestCoreBundleSCD/ba.xslt20
-rw-r--r--src/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj10
-rw-r--r--src/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs11
-rw-r--r--src/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt20
-rw-r--r--src/test/examples/EarliestCoreMBA/EarliestCoreBA.cs34
-rw-r--r--src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs22
-rw-r--r--src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj18
-rw-r--r--src/test/examples/FullFramework2Bundle/Bundle.wxs14
-rw-r--r--src/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj2
-rw-r--r--src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj20
-rw-r--r--src/test/examples/FullFramework2MBA/FullFramework2BA.cs34
-rw-r--r--src/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs22
-rw-r--r--src/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config20
-rw-r--r--src/test/examples/FullFramework4Bundle/Bundle.wxs14
-rw-r--r--src/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj2
-rw-r--r--src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj19
-rw-r--r--src/test/examples/FullFramework4MBA/FullFramework4BA.cs34
-rw-r--r--src/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs22
-rw-r--r--src/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config17
-rw-r--r--src/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs16
-rw-r--r--src/test/examples/LatestCoreBundleFDD/LatestCoreBundleFDD.wixproj2
-rw-r--r--src/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj10
-rw-r--r--src/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs11
-rw-r--r--src/test/examples/LatestCoreBundleSCD/ba.xslt20
-rw-r--r--src/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj10
-rw-r--r--src/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs11
-rw-r--r--src/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt20
-rw-r--r--src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj21
-rw-r--r--src/test/examples/LatestCoreMBA/LatestCoreBA.cs33
-rw-r--r--src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs22
-rw-r--r--src/test/examples/TestEngine/Example.TestEngine.vcxproj83
-rw-r--r--src/test/examples/TestEngine/ExampleTestEngine.cpp53
-rw-r--r--src/test/examples/TestEngine/ReloadEngine.cpp55
-rw-r--r--src/test/examples/TestEngine/ReloadEngine.h8
-rw-r--r--src/test/examples/TestEngine/ShutdownEngine.cpp38
-rw-r--r--src/test/examples/TestEngine/ShutdownEngine.h8
-rw-r--r--src/test/examples/TestEngine/TestEngine.cpp256
-rw-r--r--src/test/examples/TestEngine/TestEngine.h80
-rw-r--r--src/test/examples/TestEngine/WaitForQuitEngine.cpp35
-rw-r--r--src/test/examples/TestEngine/WaitForQuitEngine.h8
-rw-r--r--src/test/examples/TestEngine/packages.config7
-rw-r--r--src/test/examples/TestEngine/precomp.cpp3
-rw-r--r--src/test/examples/TestEngine/precomp.h20
-rw-r--r--src/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs16
-rw-r--r--src/test/examples/WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj2
-rw-r--r--src/test/examples/WPFCoreMBA/AssemblyInfo.cs12
-rw-r--r--src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj16
-rw-r--r--src/test/examples/WPFCoreMBA/MainWindow.xaml16
-rw-r--r--src/test/examples/WPFCoreMBA/MainWindow.xaml.cs17
-rw-r--r--src/test/examples/WPFCoreMBA/WPFCoreBA.cs42
-rw-r--r--src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs22
-rw-r--r--src/test/examples/Wix.Build.props10
-rw-r--r--src/test/examples/Wix.Build.targets8
-rw-r--r--src/test/examples/examples.proj50
74 files changed, 0 insertions, 2096 deletions
diff --git a/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs
deleted file mode 100644
index 2ff57c55..00000000
--- a/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs
+++ /dev/null
@@ -1,133 +0,0 @@
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
3namespace WixToolsetTest.Bal
4{
5 using System.IO;
6 using System.Linq;
7 using System.Xml;
8 using WixBuildTools.TestSupport;
9 using WixToolset.Core.TestPackage;
10 using Xunit;
11
12 public class BalExtensionFixture
13 {
14 [Fact]
15 public void CanBuildUsingDisplayInternalUICondition()
16 {
17 using (var fs = new DisposableFileSystem())
18 {
19 var baseFolder = fs.GetFolder();
20 var bundleFile = Path.Combine(baseFolder, "bin", "test.exe");
21 var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa");
22 var intermediateFolder = Path.Combine(baseFolder, "obj");
23 var baFolderPath = Path.Combine(baseFolder, "ba");
24 var extractFolderPath = Path.Combine(baseFolder, "extract");
25
26 var compileResult = WixRunner.Execute(new[]
27 {
28 "build",
29 Path.Combine(bundleSourceFolder, "DisplayInternalUIConditionBundle.wxs"),
30 "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"),
31 "-intermediateFolder", intermediateFolder,
32 "-bindpath", Path.Combine(bundleSourceFolder, "data"),
33 "-o", bundleFile,
34 });
35 compileResult.AssertSuccess();
36
37 Assert.True(File.Exists(bundleFile));
38
39 var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath);
40 extractResult.AssertSuccess();
41
42 var balPackageInfos = extractResult.SelectBADataNodes("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo");
43 var balPackageInfo = (XmlNode)Assert.Single(balPackageInfos);
44 Assert.Equal("<WixBalPackageInfo PackageId='test.msi' DisplayInternalUICondition='1' />", balPackageInfo.GetTestXml());
45
46 Assert.True(File.Exists(Path.Combine(baFolderPath, "thm.wxl")));
47 }
48 }
49
50 [Fact]
51 public void CanBuildUsingOverridable()
52 {
53 using (var fs = new DisposableFileSystem())
54 {
55 var baseFolder = fs.GetFolder();
56 var bundleFile = Path.Combine(baseFolder, "bin", "test.exe");
57 var bundleSourceFolder = TestData.Get(@"TestData\Overridable");
58 var intermediateFolder = Path.Combine(baseFolder, "obj");
59 var baFolderPath = Path.Combine(baseFolder, "ba");
60 var extractFolderPath = Path.Combine(baseFolder, "extract");
61
62 var compileResult = WixRunner.Execute(new[]
63 {
64 "build",
65 Path.Combine(bundleSourceFolder, "Bundle.wxs"),
66 "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"),
67 "-intermediateFolder", intermediateFolder,
68 "-o", bundleFile,
69 });
70 compileResult.AssertSuccess();
71
72 Assert.True(File.Exists(bundleFile));
73
74 var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath);
75 extractResult.AssertSuccess();
76
77 var balOverridableVariables = extractResult.SelectBADataNodes("/ba:BootstrapperApplicationData/ba:WixStdbaOverridableVariable");
78 var balOverridableVariable = (XmlNode)Assert.Single(balOverridableVariables);
79 Assert.Equal("<WixStdbaOverridableVariable Name='Test1' />", balOverridableVariable.GetTestXml());
80 }
81 }
82
83 [Fact]
84 public void CanBuildUsingWixStdBa()
85 {
86 using (var fs = new DisposableFileSystem())
87 {
88 var baseFolder = fs.GetFolder();
89 var bundleFile = Path.Combine(baseFolder, "bin", "test.exe");
90 var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa");
91 var intermediateFolder = Path.Combine(baseFolder, "obj");
92
93 var compileResult = WixRunner.Execute(new[]
94 {
95 "build",
96 Path.Combine(bundleSourceFolder, "Bundle.wxs"),
97 "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"),
98 "-intermediateFolder", intermediateFolder,
99 "-o", bundleFile,
100 });
101 compileResult.AssertSuccess();
102
103 Assert.True(File.Exists(bundleFile));
104 }
105 }
106
107 [Fact]
108 public void CantBuildUsingMBAWithNoPrereqs()
109 {
110 using (var fs = new DisposableFileSystem())
111 {
112 var baseFolder = fs.GetFolder();
113 var bundleFile = Path.Combine(baseFolder, "bin", "test.exe");
114 var bundleSourceFolder = TestData.Get(@"TestData\MBA");
115 var intermediateFolder = Path.Combine(baseFolder, "obj");
116
117 var compileResult = WixRunner.Execute(new[]
118 {
119 "build",
120 Path.Combine(bundleSourceFolder, "Bundle.wxs"),
121 "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"),
122 "-intermediateFolder", intermediateFolder,
123 "-o", bundleFile,
124 });
125 Assert.Equal(6802, compileResult.ExitCode);
126 Assert.Equal("There must be at least one PrereqPackage when using the ManagedBootstrapperApplicationHost.\nThis is typically done by using the WixNetFxExtension and referencing one of the NetFxAsPrereq package groups.", compileResult.Messages[0].ToString());
127
128 Assert.False(File.Exists(bundleFile));
129 Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe")));
130 }
131 }
132 }
133}
diff --git a/src/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs b/src/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs
deleted file mode 100644
index ba1aefba..00000000
--- a/src/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs
+++ /dev/null
@@ -1,12 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
4 <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2">
5 <BootstrapperApplication>
6 <bal:WixManagedBootstrapperApplicationHost />
7 </BootstrapperApplication>
8 <Chain>
9 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="runtimes\win-x86\native\wixnative.exe" />
10 </Chain>
11 </Bundle>
12</Wix>
diff --git a/src/test/WixToolsetTest.Bal/TestData/Overridable/Bundle.wxs b/src/test/WixToolsetTest.Bal/TestData/Overridable/Bundle.wxs
deleted file mode 100644
index 91380c69..00000000
--- a/src/test/WixToolsetTest.Bal/TestData/Overridable/Bundle.wxs
+++ /dev/null
@@ -1,13 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
4 <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2">
5 <BootstrapperApplication>
6 <bal:WixStandardBootstrapperApplication LicenseUrl="http://wixtoolset.org/about/license/" Theme="hyperlinkLicense" />
7 </BootstrapperApplication>
8 <Variable Name="Test1" bal:Overridable="yes" />
9 <Chain>
10 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="runtimes\win-x86\native\wixnative.exe" />
11 </Chain>
12 </Bundle>
13</Wix>
diff --git a/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs b/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs
deleted file mode 100644
index c17b53ff..00000000
--- a/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs
+++ /dev/null
@@ -1,12 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
4 <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2">
5 <BootstrapperApplication>
6 <bal:WixStandardBootstrapperApplication LicenseUrl="http://wixtoolset.org/about/license/" Theme="hyperlinkLicense" />
7 </BootstrapperApplication>
8 <Chain>
9 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="runtimes\win-x86\native\wixnative.exe" />
10 </Chain>
11 </Bundle>
12</Wix>
diff --git a/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Data/test.msi b/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Data/test.msi
deleted file mode 100644
index 94aacd1a..00000000
--- a/src/test/WixToolsetTest.Bal/TestData/WixStdBa/Data/test.msi
+++ /dev/null
Binary files differ
diff --git a/src/test/WixToolsetTest.Bal/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs b/src/test/WixToolsetTest.Bal/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs
deleted file mode 100644
index f08cfe6a..00000000
--- a/src/test/WixToolsetTest.Bal/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs
+++ /dev/null
@@ -1,12 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
4 <Bundle Name="WixStdBa" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="75D5D534-E177-4689-AAE9-CAC1C39002C2">
5 <BootstrapperApplication>
6 <bal:WixStandardBootstrapperApplication LicenseUrl="http://wixtoolset.org/about/license/" Theme="hyperlinkLicense" />
7 </BootstrapperApplication>
8 <Chain>
9 <MsiPackage SourceFile="test.msi" bal:DisplayInternalUICondition="1" />
10 </Chain>
11 </Bundle>
12</Wix>
diff --git a/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj
deleted file mode 100644
index c9ab4219..00000000
--- a/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj
+++ /dev/null
@@ -1,43 +0,0 @@
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>netcoreapp3.1</TargetFramework>
7 <IsPackable>false</IsPackable>
8 </PropertyGroup>
9
10 <ItemGroup>
11 <Content Include="TestData\MBA\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
12 <Content Include="TestData\Overridable\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
13 <Content Include="TestData\WixStdBa\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
14 <Content Include="TestData\WixStdBa\Data\test.msi" CopyToOutputDirectory="PreserveNewest" />
15 <Content Include="TestData\WixStdBa\DisplayInternalUIConditionBundle.wxs" CopyToOutputDirectory="PreserveNewest" />
16 </ItemGroup>
17
18 <Target Name="CopyExtensions" AfterTargets="Build">
19 <Copy DestinationFolder="$(OutputPath)" SourceFiles="@(WixExtension)" />
20 </Target>
21
22 <ItemGroup>
23 <ProjectReference Include="..\..\wixext\WixToolset.Bal.wixext.csproj" />
24 </ItemGroup>
25
26 <ItemGroup>
27 <PackageReference Include="WixToolset.Core" Version="4.0.*" />
28 <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" />
29 <PackageReference Include="WixToolset.Core.WindowsInstaller" Version="4.0.*" />
30 <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" />
31 <PackageReference Include="WixToolset.Data" Version="4.0.*" />
32 </ItemGroup>
33
34 <ItemGroup>
35 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
36 </ItemGroup>
37
38 <ItemGroup>
39 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
40 <PackageReference Include="xunit" Version="2.4.1" />
41 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
42 </ItemGroup>
43</Project>
diff --git a/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject b/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject
deleted file mode 100644
index 7b5b2139..00000000
--- a/src/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject
+++ /dev/null
@@ -1,5 +0,0 @@
1<ProjectConfiguration>
2 <Settings>
3 <CopyReferencedAssembliesToWorkspace>True</CopyReferencedAssembliesToWorkspace>
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.ManagedHost/DncHostFixture.cs b/src/test/WixToolsetTest.ManagedHost/DncHostFixture.cs
deleted file mode 100644
index af5f2543..00000000
--- a/src/test/WixToolsetTest.ManagedHost/DncHostFixture.cs
+++ /dev/null
@@ -1,209 +0,0 @@
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
3namespace WixToolsetTest.ManagedHost
4{
5 using System.IO;
6 using WixBuildTools.TestSupport;
7 using WixToolset.Core.TestPackage;
8 using Xunit;
9
10 public class DncHostFixture
11 {
12 static readonly string bundleBasePath = TestData.Get("..", "examples");
13
14 [Fact]
15 public void CanLoadFDDEarliestCoreMBA()
16 {
17 using (var fs = new DisposableFileSystem())
18 {
19 var baseFolder = fs.GetFolder();
20 var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleFDD.exe");
21 var testEngine = new TestEngine();
22
23 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
24 var logMessages = result.Output;
25 Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[0]);
26 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
27 Assert.Equal("EarliestCoreBA", logMessages[2]);
28 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
29 }
30 }
31
32 [Fact]
33 public void CanLoadSCDEarliestCoreMBA()
34 {
35 using (var fs = new DisposableFileSystem())
36 {
37 var baseFolder = fs.GetFolder();
38 var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleSCD.exe");
39 var testEngine = new TestEngine();
40
41 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
42 var logMessages = result.Output;
43 Assert.Equal("Loading .NET Core SCD bootstrapper application.", logMessages[0]);
44 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
45 Assert.Equal("EarliestCoreBA", logMessages[2]);
46 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
47 }
48 }
49
50 [Fact]
51 public void CanLoadTrimmedSCDEarliestCoreMBA()
52 {
53 using (var fs = new DisposableFileSystem())
54 {
55 var baseFolder = fs.GetFolder();
56 var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleTrimmedSCD.exe");
57 var testEngine = new TestEngine();
58
59 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
60 var logMessages = result.Output;
61 Assert.Equal("Loading .NET Core SCD bootstrapper application.", logMessages[0]);
62 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
63 Assert.Equal("EarliestCoreBA", logMessages[2]);
64 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
65 }
66 }
67
68 [Fact]
69 public void CanReloadSCDEarliestCoreMBA()
70 {
71 using (var fs = new DisposableFileSystem())
72 {
73 var baseFolder = fs.GetFolder();
74 var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleSCD.exe");
75 var testEngine = new TestEngine();
76
77 var result = testEngine.RunReloadEngine(bundleFile, baseFolder);
78 var logMessages = result.Output;
79 Assert.Equal("Loading .NET Core SCD bootstrapper application.", logMessages[0]);
80 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
81 Assert.Equal("EarliestCoreBA", logMessages[2]);
82 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
83 Assert.Equal("Loading .NET Core SCD bootstrapper application.", logMessages[4]);
84 Assert.Equal("Reloaded 1 time(s)", logMessages[5]); // dnchost doesn't currently support unloading
85 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[6]);
86 Assert.Equal("EarliestCoreBA", logMessages[7]);
87 Assert.Equal("Shutdown,Restart,0", logMessages[8]);
88 }
89 }
90
91 [Fact]
92 public void CanLoadFDDLatestCoreMBA()
93 {
94 using (var fs = new DisposableFileSystem())
95 {
96 var baseFolder = fs.GetFolder();
97 var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDD.exe");
98 var testEngine = new TestEngine();
99
100 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
101 var logMessages = result.Output;
102 Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[0]);
103 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
104 Assert.Equal("LatestCoreBA", logMessages[2]);
105 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
106 }
107 }
108
109 [Fact]
110 public void CanReloadFDDLatestCoreMBA()
111 {
112 using (var fs = new DisposableFileSystem())
113 {
114 var baseFolder = fs.GetFolder();
115 var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDD.exe");
116 var testEngine = new TestEngine();
117
118 var result = testEngine.RunReloadEngine(bundleFile, baseFolder);
119 var logMessages = result.Output;
120 Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[0]);
121 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
122 Assert.Equal("LatestCoreBA", logMessages[2]);
123 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
124 Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[4]);
125 Assert.Equal("Reloaded 1 time(s)", logMessages[5]); // dnchost doesn't currently support unloading
126 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[6]);
127 Assert.Equal("LatestCoreBA", logMessages[7]);
128 Assert.Equal("Shutdown,Restart,0", logMessages[8]);
129 }
130 }
131
132 [Fact]
133 public void CanLoadSCDLatestCoreMBA()
134 {
135 using (var fs = new DisposableFileSystem())
136 {
137 var baseFolder = fs.GetFolder();
138 var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleSCD.exe");
139 var testEngine = new TestEngine();
140
141 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
142 var logMessages = result.Output;
143 Assert.Equal("Loading .NET Core SCD bootstrapper application.", logMessages[0]);
144 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
145 Assert.Equal("LatestCoreBA", logMessages[2]);
146 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
147 }
148 }
149
150 [Fact]
151 public void CanLoadTrimmedSCDLatestCoreMBA()
152 {
153 using (var fs = new DisposableFileSystem())
154 {
155 var baseFolder = fs.GetFolder();
156 var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleTrimmedSCD.exe");
157 var testEngine = new TestEngine();
158
159 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
160 var logMessages = result.Output;
161 Assert.Equal("Loading .NET Core SCD bootstrapper application.", logMessages[0]);
162 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
163 Assert.Equal("LatestCoreBA", logMessages[2]);
164 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
165 }
166 }
167
168 [Fact]
169 public void CanReloadSCDLatestCoreMBA()
170 {
171 using (var fs = new DisposableFileSystem())
172 {
173 var baseFolder = fs.GetFolder();
174 var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleSCD.exe");
175 var testEngine = new TestEngine();
176
177 var result = testEngine.RunReloadEngine(bundleFile, baseFolder);
178 var logMessages = result.Output;
179 Assert.Equal("Loading .NET Core SCD bootstrapper application.", logMessages[0]);
180 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
181 Assert.Equal("LatestCoreBA", logMessages[2]);
182 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
183 Assert.Equal("Loading .NET Core SCD bootstrapper application.", logMessages[4]);
184 Assert.Equal("Reloaded 1 time(s)", logMessages[5]); // dnchost doesn't currently support unloading
185 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[6]);
186 Assert.Equal("LatestCoreBA", logMessages[7]);
187 Assert.Equal("Shutdown,Restart,0", logMessages[8]);
188 }
189 }
190
191 [Fact]
192 public void CanLoadFDDWPFCoreMBA()
193 {
194 using (var fs = new DisposableFileSystem())
195 {
196 var baseFolder = fs.GetFolder();
197 var bundleFile = TestData.Get(bundleBasePath, "WPFCoreBundleFDD.exe");
198 var testEngine = new TestEngine();
199
200 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
201 var logMessages = result.Output;
202 Assert.Equal("Loading .NET Core FDD bootstrapper application.", logMessages[0]);
203 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
204 Assert.Equal("WPFCoreBA", logMessages[2]);
205 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
206 }
207 }
208 }
209}
diff --git a/src/test/WixToolsetTest.ManagedHost/MbaHostFixture.cs b/src/test/WixToolsetTest.ManagedHost/MbaHostFixture.cs
deleted file mode 100644
index dd37ee58..00000000
--- a/src/test/WixToolsetTest.ManagedHost/MbaHostFixture.cs
+++ /dev/null
@@ -1,94 +0,0 @@
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
3namespace WixToolsetTest.ManagedHost
4{
5 using System.IO;
6 using WixBuildTools.TestSupport;
7 using WixToolset.Core.TestPackage;
8 using Xunit;
9
10 public class MbaHostFixture
11 {
12 static readonly string bundleBasePath = TestData.Get("..", "examples");
13
14 [Fact]
15 public void CanLoadFullFramework2MBA()
16 {
17 using (var fs = new DisposableFileSystem())
18 {
19 var baseFolder = fs.GetFolder();
20 var bundleFile = TestData.Get(bundleBasePath, "FullFramework2Bundle.exe");
21 var testEngine = new TestEngine();
22
23 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
24 var logMessages = result.Output;
25 Assert.Equal("Loading managed bootstrapper application.", logMessages[0]);
26 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
27 Assert.Equal("FullFramework2BA", logMessages[2]);
28 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
29 }
30 }
31
32 [Fact]
33 public void CanLoadFullFramework4MBA()
34 {
35 using (var fs = new DisposableFileSystem())
36 {
37 var baseFolder = fs.GetFolder();
38 var bundleFile = TestData.Get(bundleBasePath, "FullFramework4Bundle.exe");
39 var testEngine = new TestEngine();
40
41 var result = testEngine.RunShutdownEngine(bundleFile, baseFolder);
42 var logMessages = result.Output;
43 Assert.Equal("Loading managed bootstrapper application.", logMessages[0]);
44 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
45 Assert.Equal("FullFramework4BA", logMessages[2]);
46 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
47 }
48 }
49
50 [Fact]
51 public void CanReloadFullFramework2MBA()
52 {
53 using (var fs = new DisposableFileSystem())
54 {
55 var baseFolder = fs.GetFolder();
56 var bundleFile = TestData.Get(bundleBasePath, "FullFramework2Bundle.exe");
57 var testEngine = new TestEngine();
58
59 var result = testEngine.RunReloadEngine(bundleFile, baseFolder);
60 var logMessages = result.Output;
61 Assert.Equal("Loading managed bootstrapper application.", logMessages[0]);
62 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
63 Assert.Equal("FullFramework2BA", logMessages[2]);
64 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
65 Assert.Equal("Loading managed bootstrapper application.", logMessages[4]);
66 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[5]);
67 Assert.Equal("FullFramework2BA", logMessages[6]);
68 Assert.Equal("Shutdown,Restart,0", logMessages[7]);
69 }
70 }
71
72 [Fact]
73 public void CanReloadFullFramework4MBA()
74 {
75 using (var fs = new DisposableFileSystem())
76 {
77 var baseFolder = fs.GetFolder();
78 var bundleFile = TestData.Get(bundleBasePath, "FullFramework4Bundle.exe");
79 var testEngine = new TestEngine();
80
81 var result = testEngine.RunReloadEngine(bundleFile, baseFolder);
82 var logMessages = result.Output;
83 Assert.Equal("Loading managed bootstrapper application.", logMessages[0]);
84 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[1]);
85 Assert.Equal("FullFramework4BA", logMessages[2]);
86 Assert.Equal("Shutdown,ReloadBootstrapper,0", logMessages[3]);
87 Assert.Equal("Loading managed bootstrapper application.", logMessages[4]);
88 Assert.Equal("Creating BA thread to run asynchronously.", logMessages[5]);
89 Assert.Equal("FullFramework4BA", logMessages[6]);
90 Assert.Equal("Shutdown,Restart,0", logMessages[7]);
91 }
92 }
93 }
94}
diff --git a/src/test/WixToolsetTest.ManagedHost/README.md b/src/test/WixToolsetTest.ManagedHost/README.md
deleted file mode 100644
index d7e73df2..00000000
--- a/src/test/WixToolsetTest.ManagedHost/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
1In order to properly test dnchost and mbahost,
2the managed BAs need to be published and a bundle needs to be built for each scenario.
3Making this happen on every build for the solution takes too long,
4so this project relies on manually running appveyor.cmd to publish everything before the tests can be run.
5appveyor.cmd needs to be ran again every time changes are made in other projects. \ No newline at end of file
diff --git a/src/test/WixToolsetTest.ManagedHost/TestEngine.cs b/src/test/WixToolsetTest.ManagedHost/TestEngine.cs
deleted file mode 100644
index 44538227..00000000
--- a/src/test/WixToolsetTest.ManagedHost/TestEngine.cs
+++ /dev/null
@@ -1,74 +0,0 @@
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
3namespace WixToolsetTest.ManagedHost
4{
5 using System.Collections.Generic;
6 using System.Diagnostics;
7 using System.IO;
8 using WixBuildTools.TestSupport;
9 using WixToolset.Core.TestPackage;
10
11 public class TestEngine
12 {
13 private static readonly string TestEngineFile = TestData.Get(@"..\Win32\examples\Example.TestEngine\Example.TestEngine.exe");
14
15 public TestEngineResult RunReloadEngine(string bundleFilePath, string tempFolderPath)
16 {
17 return this.RunTestEngine("reload", bundleFilePath, tempFolderPath);
18 }
19
20 public TestEngineResult RunShutdownEngine(string bundleFilePath, string tempFolderPath)
21 {
22 return this.RunTestEngine("shutdown", bundleFilePath, tempFolderPath);
23 }
24
25 private TestEngineResult RunTestEngine(string engineMode, string bundleFilePath, string tempFolderPath)
26 {
27 var baFolderPath = Path.Combine(tempFolderPath, "ba");
28 var extractFolderPath = Path.Combine(tempFolderPath, "extract");
29 var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFilePath, baFolderPath, extractFolderPath);
30 extractResult.AssertSuccess();
31
32 var args = new string[] {
33 engineMode,
34 '"' + bundleFilePath + '"',
35 '"' + extractResult.GetBAFilePath(baFolderPath) + '"',
36 };
37 return RunProcessCaptureOutput(TestEngineFile, args);
38 }
39
40 private static TestEngineResult RunProcessCaptureOutput(string executablePath, string[] arguments = null, string workingFolder = null)
41 {
42 var startInfo = new ProcessStartInfo(executablePath)
43 {
44 Arguments = string.Join(' ', arguments),
45 CreateNoWindow = true,
46 RedirectStandardError = true,
47 RedirectStandardOutput = true,
48 UseShellExecute = false,
49 WorkingDirectory = workingFolder,
50 };
51
52 var exitCode = 0;
53 var output = new List<string>();
54
55 using (var process = Process.Start(startInfo))
56 {
57 process.OutputDataReceived += (s, e) => { if (e.Data != null) { output.Add(e.Data); } };
58 process.ErrorDataReceived += (s, e) => { if (e.Data != null) { output.Add(e.Data); } };
59
60 process.BeginErrorReadLine();
61 process.BeginOutputReadLine();
62
63 process.WaitForExit();
64 exitCode = process.ExitCode;
65 }
66
67 return new TestEngineResult
68 {
69 ExitCode = exitCode,
70 Output = output,
71 };
72 }
73 }
74}
diff --git a/src/test/WixToolsetTest.ManagedHost/TestEngineResult.cs b/src/test/WixToolsetTest.ManagedHost/TestEngineResult.cs
deleted file mode 100644
index 63f6f7f5..00000000
--- a/src/test/WixToolsetTest.ManagedHost/TestEngineResult.cs
+++ /dev/null
@@ -1,12 +0,0 @@
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
3namespace WixToolsetTest.ManagedHost
4{
5 using System.Collections.Generic;
6
7 public class TestEngineResult
8 {
9 public int ExitCode { get; set; }
10 public List<string> Output { get; set; }
11 }
12}
diff --git a/src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj b/src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj
deleted file mode 100644
index 38c8926c..00000000
--- a/src/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
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>netcoreapp3.1</TargetFramework>
7 </PropertyGroup>
8
9 <ItemGroup>
10 <ProjectReference Include="..\examples\TestEngine\Example.TestEngine.vcxproj" />
11 </ItemGroup>
12
13 <ItemGroup>
14 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
15 <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" />
16 <PackageReference Include="WixToolset.Core.WindowsInstaller" Version="4.0.*" />
17 <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" />
18 </ItemGroup>
19
20 <ItemGroup>
21 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
22 <PackageReference Include="xunit" Version="2.4.1" />
23 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
24 </ItemGroup>
25</Project>
diff --git a/src/test/examples/Directory.Build.props b/src/test/examples/Directory.Build.props
deleted file mode 100644
index 3d5870a5..00000000
--- a/src/test/examples/Directory.Build.props
+++ /dev/null
@@ -1,6 +0,0 @@
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>
4 <Import Project="..\..\Directory.Build.props" />
5 <Import Project="Wix.Build.props" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " />
6</Project>
diff --git a/src/test/examples/Directory.Build.targets b/src/test/examples/Directory.Build.targets
deleted file mode 100644
index 6dcf402b..00000000
--- a/src/test/examples/Directory.Build.targets
+++ /dev/null
@@ -1,6 +0,0 @@
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>
4 <Import Project="..\..\Directory.Build.targets" />
5 <Import Project="Wix.Build.targets" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " />
6</Project>
diff --git a/src/test/examples/EarliestCoreBundleFDD/EarliestCoreBundleFDD.wixproj b/src/test/examples/EarliestCoreBundleFDD/EarliestCoreBundleFDD.wixproj
deleted file mode 100644
index ba75a9ff..00000000
--- a/src/test/examples/EarliestCoreBundleFDD/EarliestCoreBundleFDD.wixproj
+++ /dev/null
@@ -1,2 +0,0 @@
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<Project Sdk="WixToolset.Sdk" />
diff --git a/src/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs
deleted file mode 100644
index d146845c..00000000
--- a/src/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs
+++ /dev/null
@@ -1,16 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="FDDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication>
4 <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" />
5 <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" />
6 <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.pdb" Name="Example.EarliestCoreMBA.pdb" />
7 <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" />
8 <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" />
9 <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" />
10 <bal:WixDotNetCoreBootstrapperApplicationHost />
11 </BootstrapperApplication>
12 <Chain>
13 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" bal:PrereqPackage="yes" />
14 </Chain>
15 </Bundle>
16</Wix>
diff --git a/src/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj b/src/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj
deleted file mode 100644
index ebeebff2..00000000
--- a/src/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj
+++ /dev/null
@@ -1,10 +0,0 @@
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<Project Sdk="WixToolset.Sdk">
3 <ItemGroup>
4 <BindInputPaths Include="$(OutputPath)publish\Example.EarliestCoreMBA\scd" />
5 <HarvestDirectory Include="$(OutputPath)publish\Example.EarliestCoreMBA\scd">
6 <DirectoryRefId>publish.Example.EarliestCoreMBA.scd</DirectoryRefId>
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10</Project>
diff --git a/src/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs b/src/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs
deleted file mode 100644
index 4d872317..00000000
--- a/src/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs
+++ /dev/null
@@ -1,11 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication>
4 <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" />
5 <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.scd" />
6 </BootstrapperApplication>
7 <Chain>
8 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" PerMachine="yes" />
9 </Chain>
10 </Bundle>
11</Wix>
diff --git a/src/test/examples/EarliestCoreBundleSCD/ba.xslt b/src/test/examples/EarliestCoreBundleSCD/ba.xslt
deleted file mode 100644
index 06b84256..00000000
--- a/src/test/examples/EarliestCoreBundleSCD/ba.xslt
+++ /dev/null
@@ -1,20 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.dll']" >
15 <xsl:copy>
16 <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute>
17 <xsl:apply-templates select="@* | node()"/>
18 </xsl:copy>
19 </xsl:template>
20</xsl:stylesheet>
diff --git a/src/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj b/src/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj
deleted file mode 100644
index a6b56460..00000000
--- a/src/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj
+++ /dev/null
@@ -1,10 +0,0 @@
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<Project Sdk="WixToolset.Sdk">
3 <ItemGroup>
4 <BindInputPaths Include="$(OutputPath)publish\Example.EarliestCoreMBA\trimmedscd" />
5 <HarvestDirectory Include="$(OutputPath)publish\Example.EarliestCoreMBA\trimmedscd">
6 <DirectoryRefId>publish.Example.EarliestCoreMBA.trimmedscd</DirectoryRefId>
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10</Project>
diff --git a/src/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
deleted file mode 100644
index ba7dce25..00000000
--- a/src/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
+++ /dev/null
@@ -1,11 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication>
4 <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" />
5 <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.trimmedscd" />
6 </BootstrapperApplication>
7 <Chain>
8 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" PerMachine="yes" />
9 </Chain>
10 </Bundle>
11</Wix>
diff --git a/src/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt b/src/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt
deleted file mode 100644
index 06b84256..00000000
--- a/src/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt
+++ /dev/null
@@ -1,20 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.dll']" >
15 <xsl:copy>
16 <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute>
17 <xsl:apply-templates select="@* | node()"/>
18 </xsl:copy>
19 </xsl:template>
20</xsl:stylesheet>
diff --git a/src/test/examples/EarliestCoreMBA/EarliestCoreBA.cs b/src/test/examples/EarliestCoreMBA/EarliestCoreBA.cs
deleted file mode 100644
index c9291a7f..00000000
--- a/src/test/examples/EarliestCoreMBA/EarliestCoreBA.cs
+++ /dev/null
@@ -1,34 +0,0 @@
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
3namespace Example.EarliestCoreMBA
4{
5 using WixToolset.Mba.Core;
6
7 public class EarliestCoreBA : BootstrapperApplication
8 {
9 public EarliestCoreBA(IEngine engine)
10 : base(engine)
11 {
12
13 }
14
15 protected override void Run()
16 {
17 }
18
19 protected override void OnStartup(StartupEventArgs args)
20 {
21 base.OnStartup(args);
22
23 this.engine.Log(LogLevel.Standard, nameof(EarliestCoreBA));
24 }
25
26 protected override void OnShutdown(ShutdownEventArgs args)
27 {
28 base.OnShutdown(args);
29
30 var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString();
31 this.engine.Log(LogLevel.Standard, message);
32 }
33 }
34}
diff --git a/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs b/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs
deleted file mode 100644
index 672e17ee..00000000
--- a/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs
+++ /dev/null
@@ -1,22 +0,0 @@
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[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.EarliestCoreMBA.EarliestCoreBAFactory))]
4namespace Example.EarliestCoreMBA
5{
6 using WixToolset.Mba.Core;
7
8 public class EarliestCoreBAFactory : BaseBootstrapperApplicationFactory
9 {
10 private static int loadCount = 0;
11
12 protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand)
13 {
14 if (loadCount > 0)
15 {
16 engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)");
17 }
18 ++loadCount;
19 return new EarliestCoreBA(engine);
20 }
21 }
22}
diff --git a/src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj b/src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj
deleted file mode 100644
index cb66c138..00000000
--- a/src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj
+++ /dev/null
@@ -1,18 +0,0 @@
1<Project Sdk="Microsoft.NET.Sdk">
2
3 <PropertyGroup>
4 <TargetFramework>netcoreapp3.1</TargetFramework>
5 <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
6 <EnableDynamicLoading>true</EnableDynamicLoading>
7 <Description>Earliest .NET Core MBA</Description>
8 </PropertyGroup>
9
10 <ItemGroup>
11 <TrimmerRootAssembly Include="System.Runtime.Loader" />
12 </ItemGroup>
13
14 <ItemGroup>
15 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
16 <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
17 </ItemGroup>
18</Project> \ No newline at end of file
diff --git a/src/test/examples/FullFramework2Bundle/Bundle.wxs b/src/test/examples/FullFramework2Bundle/Bundle.wxs
deleted file mode 100644
index f0af975c..00000000
--- a/src/test/examples/FullFramework2Bundle/Bundle.wxs
+++ /dev/null
@@ -1,14 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="FullFramework2MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication>
4 <Payload SourceFile="Example.FullFramework2MBA\net20\win-x86\Example.FullFramework2MBA.dll" />
5 <Payload SourceFile="Example.FullFramework2MBA\net20\win-x86\mbanative.dll" />
6 <Payload SourceFile="Example.FullFramework2MBA\net20\win-x86\WixToolset.Mba.Core.dll" />
7 <Payload SourceFile="Example.FullFramework2MBA\net20\win-x86\WixToolset.Mba.Host.config" />
8 <bal:WixManagedBootstrapperApplicationHost />
9 </BootstrapperApplication>
10 <Chain>
11 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" bal:PrereqPackage="yes" />
12 </Chain>
13 </Bundle>
14</Wix>
diff --git a/src/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj b/src/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj
deleted file mode 100644
index ba75a9ff..00000000
--- a/src/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj
+++ /dev/null
@@ -1,2 +0,0 @@
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<Project Sdk="WixToolset.Sdk" />
diff --git a/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj b/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj
deleted file mode 100644
index 21079ed1..00000000
--- a/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj
+++ /dev/null
@@ -1,20 +0,0 @@
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>net20</TargetFramework>
7 <AssemblyName>Example.FullFramework2MBA</AssemblyName>
8 <RootNamespace>Example.FullFramework2MBA</RootNamespace>
9 <DebugType>embedded</DebugType>
10 <RuntimeIdentifier>win-x86</RuntimeIdentifier>
11 </PropertyGroup>
12
13 <ItemGroup>
14 <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" />
15 </ItemGroup>
16
17 <ItemGroup>
18 <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
19 </ItemGroup>
20</Project> \ No newline at end of file
diff --git a/src/test/examples/FullFramework2MBA/FullFramework2BA.cs b/src/test/examples/FullFramework2MBA/FullFramework2BA.cs
deleted file mode 100644
index 32cd19c8..00000000
--- a/src/test/examples/FullFramework2MBA/FullFramework2BA.cs
+++ /dev/null
@@ -1,34 +0,0 @@
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
3namespace Example.FullFramework2MBA
4{
5 using WixToolset.Mba.Core;
6
7 public class FullFramework2BA : BootstrapperApplication
8 {
9 public FullFramework2BA(IEngine engine)
10 : base(engine)
11 {
12
13 }
14
15 protected override void Run()
16 {
17 }
18
19 protected override void OnStartup(StartupEventArgs args)
20 {
21 base.OnStartup(args);
22
23 this.engine.Log(LogLevel.Standard, nameof(FullFramework2BA));
24 }
25
26 protected override void OnShutdown(ShutdownEventArgs args)
27 {
28 base.OnShutdown(args);
29
30 var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString();
31 this.engine.Log(LogLevel.Standard, message);
32 }
33 }
34}
diff --git a/src/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs b/src/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs
deleted file mode 100644
index 647c2040..00000000
--- a/src/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs
+++ /dev/null
@@ -1,22 +0,0 @@
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[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.FullFramework2MBA.FullFramework2BAFactory))]
4namespace Example.FullFramework2MBA
5{
6 using WixToolset.Mba.Core;
7
8 public class FullFramework2BAFactory : BaseBootstrapperApplicationFactory
9 {
10 private static int loadCount = 0;
11
12 protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand)
13 {
14 if (loadCount > 0)
15 {
16 engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)");
17 }
18 ++loadCount;
19 return new FullFramework2BA(engine);
20 }
21 }
22}
diff --git a/src/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config b/src/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config
deleted file mode 100644
index be450a4f..00000000
--- a/src/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config
+++ /dev/null
@@ -1,20 +0,0 @@
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.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host">
8 <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" />
9 </sectionGroup>
10 </configSections>
11 <startup>
12 <supportedRuntime version="v2.0.50727" />
13 </startup>
14 <wix.bootstrapper>
15
16 <host assemblyName="Example.FullFramework2MBA">
17 <supportedFramework version="v3.5" />
18 </host>
19 </wix.bootstrapper>
20</configuration>
diff --git a/src/test/examples/FullFramework4Bundle/Bundle.wxs b/src/test/examples/FullFramework4Bundle/Bundle.wxs
deleted file mode 100644
index 7b7cbf57..00000000
--- a/src/test/examples/FullFramework4Bundle/Bundle.wxs
+++ /dev/null
@@ -1,14 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="FullFramework4MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="E08068E0-4FBA-439D-A1C8-4CD1FE27093F">
3 <BootstrapperApplication>
4 <Payload SourceFile="Example.FullFramework4MBA\net48\win-x86\Example.FullFramework4MBA.dll" />
5 <Payload SourceFile="Example.FullFramework4MBA\net48\win-x86\mbanative.dll" />
6 <Payload SourceFile="Example.FullFramework4MBA\net48\win-x86\WixToolset.Mba.Core.dll" />
7 <Payload SourceFile="Example.FullFramework4MBA\net48\win-x86\WixToolset.Mba.Host.config" />
8 <bal:WixManagedBootstrapperApplicationHost />
9 </BootstrapperApplication>
10 <Chain>
11 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" bal:PrereqPackage="yes" />
12 </Chain>
13 </Bundle>
14</Wix>
diff --git a/src/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj b/src/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj
deleted file mode 100644
index ba75a9ff..00000000
--- a/src/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj
+++ /dev/null
@@ -1,2 +0,0 @@
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<Project Sdk="WixToolset.Sdk" />
diff --git a/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj b/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj
deleted file mode 100644
index a05e7888..00000000
--- a/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj
+++ /dev/null
@@ -1,19 +0,0 @@
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>net48</TargetFramework>
7 <Description>Full Framework v4 MBA</Description>
8 <RuntimeIdentifier>win-x86</RuntimeIdentifier>
9 </PropertyGroup>
10
11 <ItemGroup>
12 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
13 <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" PrivateAssets="All" />
14 </ItemGroup>
15
16 <ItemGroup>
17 <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" />
18 </ItemGroup>
19</Project> \ No newline at end of file
diff --git a/src/test/examples/FullFramework4MBA/FullFramework4BA.cs b/src/test/examples/FullFramework4MBA/FullFramework4BA.cs
deleted file mode 100644
index 8ee3bd19..00000000
--- a/src/test/examples/FullFramework4MBA/FullFramework4BA.cs
+++ /dev/null
@@ -1,34 +0,0 @@
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
3namespace Example.FullFramework4MBA
4{
5 using WixToolset.Mba.Core;
6
7 public class FullFramework4BA : BootstrapperApplication
8 {
9 public FullFramework4BA(IEngine engine)
10 : base(engine)
11 {
12
13 }
14
15 protected override void Run()
16 {
17 }
18
19 protected override void OnStartup(StartupEventArgs args)
20 {
21 base.OnStartup(args);
22
23 this.engine.Log(LogLevel.Standard, nameof(FullFramework4BA));
24 }
25
26 protected override void OnShutdown(ShutdownEventArgs args)
27 {
28 base.OnShutdown(args);
29
30 var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString();
31 this.engine.Log(LogLevel.Standard, message);
32 }
33 }
34}
diff --git a/src/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs b/src/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs
deleted file mode 100644
index 6a571a54..00000000
--- a/src/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs
+++ /dev/null
@@ -1,22 +0,0 @@
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[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.FullFramework4MBA.FullFramework4BAFactory))]
4namespace Example.FullFramework4MBA
5{
6 using WixToolset.Mba.Core;
7
8 public class FullFramework4BAFactory : BaseBootstrapperApplicationFactory
9 {
10 private static int loadCount = 0;
11
12 protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand)
13 {
14 if (loadCount > 0)
15 {
16 engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)");
17 }
18 ++loadCount;
19 return new FullFramework4BA(engine);
20 }
21 }
22}
diff --git a/src/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config b/src/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config
deleted file mode 100644
index 96678cda..00000000
--- a/src/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config
+++ /dev/null
@@ -1,17 +0,0 @@
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.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host">
8 <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" />
9 </sectionGroup>
10 </configSections>
11 <startup>
12 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
13 </startup>
14 <wix.bootstrapper>
15 <host assemblyName="Example.FullFramework4MBA" />
16 </wix.bootstrapper>
17</configuration>
diff --git a/src/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs
deleted file mode 100644
index d5b543e8..00000000
--- a/src/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs
+++ /dev/null
@@ -1,16 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="FDDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication>
4 <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" />
5 <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" />
6 <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.pdb" Name="Example.LatestCoreMBA.pdb" />
7 <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" />
8 <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" />
9 <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" />
10 <bal:WixDotNetCoreBootstrapperApplicationHost />
11 </BootstrapperApplication>
12 <Chain>
13 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" bal:PrereqPackage="yes" />
14 </Chain>
15 </Bundle>
16</Wix>
diff --git a/src/test/examples/LatestCoreBundleFDD/LatestCoreBundleFDD.wixproj b/src/test/examples/LatestCoreBundleFDD/LatestCoreBundleFDD.wixproj
deleted file mode 100644
index ba75a9ff..00000000
--- a/src/test/examples/LatestCoreBundleFDD/LatestCoreBundleFDD.wixproj
+++ /dev/null
@@ -1,2 +0,0 @@
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<Project Sdk="WixToolset.Sdk" />
diff --git a/src/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj b/src/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj
deleted file mode 100644
index 30a860ab..00000000
--- a/src/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj
+++ /dev/null
@@ -1,10 +0,0 @@
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<Project Sdk="WixToolset.Sdk">
3 <ItemGroup>
4 <BindInputPaths Include="$(OutputPath)publish\Example.LatestCoreMBA\scd" />
5 <HarvestDirectory Include="$(OutputPath)publish\Example.LatestCoreMBA\scd">
6 <DirectoryRefId>publish.Example.LatestCoreMBA.scd</DirectoryRefId>
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10</Project>
diff --git a/src/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs b/src/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs
deleted file mode 100644
index bedf0326..00000000
--- a/src/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs
+++ /dev/null
@@ -1,11 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication>
4 <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" />
5 <PayloadGroupRef Id="publish.Example.LatestCoreMBA.scd" />
6 </BootstrapperApplication>
7 <Chain>
8 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" PerMachine="yes" />
9 </Chain>
10 </Bundle>
11</Wix>
diff --git a/src/test/examples/LatestCoreBundleSCD/ba.xslt b/src/test/examples/LatestCoreBundleSCD/ba.xslt
deleted file mode 100644
index acc7474c..00000000
--- a/src/test/examples/LatestCoreBundleSCD/ba.xslt
+++ /dev/null
@@ -1,20 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.dll']" >
15 <xsl:copy>
16 <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute>
17 <xsl:apply-templates select="@* | node()"/>
18 </xsl:copy>
19 </xsl:template>
20</xsl:stylesheet>
diff --git a/src/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj b/src/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj
deleted file mode 100644
index 5ce89b64..00000000
--- a/src/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj
+++ /dev/null
@@ -1,10 +0,0 @@
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<Project Sdk="WixToolset.Sdk">
3 <ItemGroup>
4 <BindInputPaths Include="$(OutputPath)publish\Example.LatestCoreMBA\trimmedscd" />
5 <HarvestDirectory Include="$(OutputPath)publish\Example.LatestCoreMBA\trimmedscd">
6 <DirectoryRefId>publish.Example.LatestCoreMBA.trimmedscd</DirectoryRefId>
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10</Project>
diff --git a/src/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
deleted file mode 100644
index 6059f8c1..00000000
--- a/src/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
+++ /dev/null
@@ -1,11 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication>
4 <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" />
5 <PayloadGroupRef Id="publish.Example.LatestCoreMBA.trimmedscd" />
6 </BootstrapperApplication>
7 <Chain>
8 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" PerMachine="yes" />
9 </Chain>
10 </Bundle>
11</Wix>
diff --git a/src/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt b/src/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt
deleted file mode 100644
index acc7474c..00000000
--- a/src/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt
+++ /dev/null
@@ -1,20 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.dll']" >
15 <xsl:copy>
16 <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute>
17 <xsl:apply-templates select="@* | node()"/>
18 </xsl:copy>
19 </xsl:template>
20</xsl:stylesheet>
diff --git a/src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj b/src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj
deleted file mode 100644
index 9f3f02d9..00000000
--- a/src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
1<Project Sdk="Microsoft.NET.Sdk">
2
3 <PropertyGroup>
4 <TargetFramework>net5.0</TargetFramework>
5 <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
6 <EnableDynamicLoading>true</EnableDynamicLoading>
7 <Description>Latest .NET Core MBA</Description>
8 </PropertyGroup>
9
10 <ItemGroup>
11 <TrimmerRootAssembly Include="System.Diagnostics.Tools" />
12 <TrimmerRootAssembly Include="System.Runtime" />
13 <TrimmerRootAssembly Include="System.Runtime.InteropServices" />
14 <TrimmerRootAssembly Include="System.Runtime.Loader" />
15 </ItemGroup>
16
17 <ItemGroup>
18 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
19 <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
20 </ItemGroup>
21</Project> \ No newline at end of file
diff --git a/src/test/examples/LatestCoreMBA/LatestCoreBA.cs b/src/test/examples/LatestCoreMBA/LatestCoreBA.cs
deleted file mode 100644
index 50386a87..00000000
--- a/src/test/examples/LatestCoreMBA/LatestCoreBA.cs
+++ /dev/null
@@ -1,33 +0,0 @@
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
3namespace Example.LatestCoreMBA
4{
5 using WixToolset.Mba.Core;
6
7 public class LatestCoreBA : BootstrapperApplication
8 {
9 public LatestCoreBA(IEngine engine)
10 : base(engine)
11 {
12 }
13
14 protected override void Run()
15 {
16 }
17
18 protected override void OnStartup(StartupEventArgs args)
19 {
20 base.OnStartup(args);
21
22 this.engine.Log(LogLevel.Standard, nameof(LatestCoreBA));
23 }
24
25 protected override void OnShutdown(ShutdownEventArgs args)
26 {
27 base.OnShutdown(args);
28
29 var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString();
30 this.engine.Log(LogLevel.Standard, message);
31 }
32 }
33}
diff --git a/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs b/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs
deleted file mode 100644
index fff3b5c5..00000000
--- a/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs
+++ /dev/null
@@ -1,22 +0,0 @@
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[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.LatestCoreMBA.LatestCoreBAFactory))]
4namespace Example.LatestCoreMBA
5{
6 using WixToolset.Mba.Core;
7
8 public class LatestCoreBAFactory : BaseBootstrapperApplicationFactory
9 {
10 private static int loadCount = 0;
11
12 protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand)
13 {
14 if (loadCount > 0)
15 {
16 engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)");
17 }
18 ++loadCount;
19 return new LatestCoreBA(engine);
20 }
21 }
22}
diff --git a/src/test/examples/TestEngine/Example.TestEngine.vcxproj b/src/test/examples/TestEngine/Example.TestEngine.vcxproj
deleted file mode 100644
index 99eb917e..00000000
--- a/src/test/examples/TestEngine/Example.TestEngine.vcxproj
+++ /dev/null
@@ -1,83 +0,0 @@
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.58\build\WixToolset.BalUtil.props" Condition="Exists('..\..\..\..\packages\WixToolset.BalUtil.4.0.58\build\WixToolset.BalUtil.props')" />
5 <Import Project="..\..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" />
6 <Import Project="..\..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" />
7 <ItemGroup Label="ProjectConfigurations">
8 <ProjectConfiguration Include="Debug|ARM64">
9 <Configuration>Debug</Configuration>
10 <Platform>ARM64</Platform>
11 </ProjectConfiguration>
12 <ProjectConfiguration Include="Release|ARM64">
13 <Configuration>Release</Configuration>
14 <Platform>ARM64</Platform>
15 </ProjectConfiguration>
16 <ProjectConfiguration Include="Debug|Win32">
17 <Configuration>Debug</Configuration>
18 <Platform>Win32</Platform>
19 </ProjectConfiguration>
20 <ProjectConfiguration Include="Release|Win32">
21 <Configuration>Release</Configuration>
22 <Platform>Win32</Platform>
23 </ProjectConfiguration>
24 <ProjectConfiguration Include="Debug|x64">
25 <Configuration>Debug</Configuration>
26 <Platform>x64</Platform>
27 </ProjectConfiguration>
28 <ProjectConfiguration Include="Release|x64">
29 <Configuration>Release</Configuration>
30 <Platform>x64</Platform>
31 </ProjectConfiguration>
32 </ItemGroup>
33 <PropertyGroup Label="Globals">
34 <ProjectGuid>{3D44B67D-A475-49BA-8310-E39F6C117CC9}</ProjectGuid>
35 <ConfigurationType>Application</ConfigurationType>
36 <ProjectSubSystem>Console</ProjectSubSystem>
37 <TargetName>Example.TestEngine</TargetName>
38 <PlatformToolset>v142</PlatformToolset>
39 <CharacterSet>Unicode</CharacterSet>
40 <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
41 </PropertyGroup>
42 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
43 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
44 <ImportGroup Label="ExtensionSettings">
45 </ImportGroup>
46 <ImportGroup Label="Shared">
47 <Import Project="..\..\..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" />
48 </ImportGroup>
49 <PropertyGroup>
50 <ProjectAdditionalLinkLibraries>
51 </ProjectAdditionalLinkLibraries>
52 </PropertyGroup>
53 <ItemGroup>
54 <ClCompile Include="precomp.cpp">
55 <PrecompiledHeader>Create</PrecompiledHeader>
56 </ClCompile>
57 <ClCompile Include="ReloadEngine.cpp" />
58 <ClCompile Include="ShutdownEngine.cpp" />
59 <ClCompile Include="ExampleTestEngine.cpp" />
60 <ClCompile Include="TestEngine.cpp" />
61 <ClCompile Include="WaitForQuitEngine.cpp" />
62 </ItemGroup>
63 <ItemGroup>
64 <ClInclude Include="precomp.h" />
65 <ClInclude Include="ReloadEngine.h" />
66 <ClInclude Include="ShutdownEngine.h" />
67 <ClInclude Include="TestEngine.h" />
68 <ClInclude Include="WaitForQuitEngine.h" />
69 </ItemGroup>
70 <ItemGroup>
71 <None Include="packages.config" />
72 </ItemGroup>
73 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
74 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
75 <PropertyGroup>
76 <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>
77 </PropertyGroup>
78 <Error Condition="!Exists('..\..\..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
79 <Error Condition="!Exists('..\..\..\..\packages\WixToolset.BalUtil.4.0.58\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\WixToolset.BalUtil.4.0.58\build\WixToolset.BalUtil.props'))" />
80 <Error Condition="!Exists('..\..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props'))" />
81 <Error Condition="!Exists('..\..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" />
82 </Target>
83</Project> \ No newline at end of file
diff --git a/src/test/examples/TestEngine/ExampleTestEngine.cpp b/src/test/examples/TestEngine/ExampleTestEngine.cpp
deleted file mode 100644
index fc1938fe..00000000
--- a/src/test/examples/TestEngine/ExampleTestEngine.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
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
5int __cdecl wmain(int argc, LPWSTR argv[])
6{
7 HRESULT hr = S_OK;
8 BOOL fComInitialized = FALSE;
9 BOOL fShowUsage = FALSE;
10
11 // initialize COM
12 hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
13 ExitOnFailure(hr, "Failed to initialize COM.");
14 fComInitialized = TRUE;
15
16 ConsoleInitialize();
17
18 if (argc != 4)
19 {
20 fShowUsage = TRUE;
21 }
22 else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"reload", -1))
23 {
24 hr = RunReloadEngine(argv[2], argv[3]);
25 }
26 else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"shutdown", -1))
27 {
28 hr = RunShutdownEngine(argv[2], argv[3]);
29 }
30 else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"waitforquit", -1))
31 {
32 hr = RunWaitForQuitEngine(argv[2], argv[3]);
33 }
34 else
35 {
36 fShowUsage = TRUE;
37 }
38
39 if (fShowUsage)
40 {
41 ConsoleWriteError(hr = E_INVALIDARG, CONSOLE_COLOR_RED, "Usage: Example.TestEngine.exe {reload|shutdown|waitforquit} Bundle.exe BA.dll");
42 }
43
44 ConsoleUninitialize();
45
46LExit:
47 if (fComInitialized)
48 {
49 ::CoUninitialize();
50 }
51
52 return hr;
53}
diff --git a/src/test/examples/TestEngine/ReloadEngine.cpp b/src/test/examples/TestEngine/ReloadEngine.cpp
deleted file mode 100644
index 46fd9afa..00000000
--- a/src/test/examples/TestEngine/ReloadEngine.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
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
5HRESULT RunReloadEngine(
6 __in LPCWSTR wzBundleFilePath,
7 __in LPCWSTR wzBAFilePath
8 )
9{
10 HRESULT hr = S_OK;
11 TestEngine* pTestEngine = NULL;
12
13 pTestEngine = new TestEngine();
14 ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine.");
15
16 hr = pTestEngine->Initialize(wzBundleFilePath);
17 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine.");
18
19 hr = pTestEngine->LoadBA(wzBAFilePath);
20 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA.");
21
22 hr = pTestEngine->SendStartupEvent();
23 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup.");
24
25 hr = pTestEngine->SimulateQuit(0);
26 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit.");
27
28 hr = pTestEngine->RunApplication();
29 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine.");
30
31 hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER);
32 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown.");
33
34 pTestEngine->UnloadBA();
35
36 hr = pTestEngine->LoadBA(wzBAFilePath);
37 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA.");
38
39 hr = pTestEngine->SendStartupEvent();
40 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup.");
41
42 hr = pTestEngine->SimulateQuit(0);
43 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit.");
44
45 hr = pTestEngine->RunApplication();
46 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine.");
47
48 hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART);
49 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown.");
50
51 pTestEngine->UnloadBA();
52
53LExit:
54 return hr;
55}
diff --git a/src/test/examples/TestEngine/ReloadEngine.h b/src/test/examples/TestEngine/ReloadEngine.h
deleted file mode 100644
index 0e8456af..00000000
--- a/src/test/examples/TestEngine/ReloadEngine.h
+++ /dev/null
@@ -1,8 +0,0 @@
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
5HRESULT RunReloadEngine(
6 __in LPCWSTR wzBundleFilePath,
7 __in LPCWSTR wzBAFilePath
8 );
diff --git a/src/test/examples/TestEngine/ShutdownEngine.cpp b/src/test/examples/TestEngine/ShutdownEngine.cpp
deleted file mode 100644
index 3b876e4e..00000000
--- a/src/test/examples/TestEngine/ShutdownEngine.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
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
5HRESULT RunShutdownEngine(
6 __in LPCWSTR wzBundleFilePath,
7 __in LPCWSTR wzBAFilePath
8 )
9{
10 HRESULT hr = S_OK;
11 TestEngine* pTestEngine = NULL;
12
13 pTestEngine = new TestEngine();
14 ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine.");
15
16 hr = pTestEngine->Initialize(wzBundleFilePath);
17 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine.");
18
19 hr = pTestEngine->LoadBA(wzBAFilePath);
20 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA.");
21
22 hr = pTestEngine->SendStartupEvent();
23 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup.");
24
25 hr = pTestEngine->SimulateQuit(0);
26 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit.");
27
28 hr = pTestEngine->RunApplication();
29 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine.");
30
31 hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER);
32 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown.");
33
34 pTestEngine->UnloadBA();
35
36LExit:
37 return hr;
38}
diff --git a/src/test/examples/TestEngine/ShutdownEngine.h b/src/test/examples/TestEngine/ShutdownEngine.h
deleted file mode 100644
index 0cfa147a..00000000
--- a/src/test/examples/TestEngine/ShutdownEngine.h
+++ /dev/null
@@ -1,8 +0,0 @@
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
5HRESULT RunShutdownEngine(
6 __in LPCWSTR wzBundleFilePath,
7 __in LPCWSTR wzBAFilePath
8 );
diff --git a/src/test/examples/TestEngine/TestEngine.cpp b/src/test/examples/TestEngine/TestEngine.cpp
deleted file mode 100644
index 4c7ec1c3..00000000
--- a/src/test/examples/TestEngine/TestEngine.cpp
+++ /dev/null
@@ -1,256 +0,0 @@
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
5HRESULT TestEngine::Initialize(
6 __in LPCWSTR wzBundleFilePath
7 )
8{
9 HRESULT hr = S_OK;
10 MSG msg = { };
11
12 LogInitialize(::GetModuleHandleW(NULL));
13
14 hr = LogOpen(NULL, PathFile(wzBundleFilePath), NULL, L"txt", FALSE, FALSE, NULL);
15 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to open log.");
16
17 ::PeekMessageW(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
18
19LExit:
20 return hr;
21}
22
23HRESULT TestEngine::LoadBA(
24 __in LPCWSTR wzBAFilePath
25 )
26{
27 HRESULT hr = S_OK;
28 BOOTSTRAPPER_COMMAND command = { };
29 BOOTSTRAPPER_CREATE_ARGS args = { };
30 PFN_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = NULL;
31
32 if (m_pCreateResults || m_hBAModule)
33 {
34 ExitFunction1(hr = E_INVALIDSTATE);
35 }
36
37 m_pCreateResults = static_cast<BOOTSTRAPPER_CREATE_RESULTS*>(MemAlloc(sizeof(BOOTSTRAPPER_CREATE_RESULTS), TRUE));
38
39 command.cbSize = sizeof(BOOTSTRAPPER_COMMAND);
40
41 hr = PathGetDirectory(wzBAFilePath, &command.wzBootstrapperWorkingFolder);
42 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperWorkingFolder");
43
44 hr = PathConcat(command.wzBootstrapperWorkingFolder, L"BootstrapperApplicationData.xml", &command.wzBootstrapperApplicationDataPath);
45 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperApplicationDataPath");
46
47 args.cbSize = sizeof(BOOTSTRAPPER_CREATE_ARGS);
48 args.pCommand = &command;
49 args.pfnBootstrapperEngineProc = TestEngine::EngineProc;
50 args.pvBootstrapperEngineProcContext = this;
51 args.qwEngineAPIVersion = MAKEQWORDVERSION(0, 0, 0, 1);
52
53 m_pCreateResults->cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS);
54
55 m_hBAModule = ::LoadLibraryExW(wzBAFilePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
56 ConsoleExitOnNullWithLastError(m_hBAModule, hr, CONSOLE_COLOR_RED, "Failed to load BA dll.");
57
58 pfnCreate = (PFN_BOOTSTRAPPER_APPLICATION_CREATE)::GetProcAddress(m_hBAModule, "BootstrapperApplicationCreate");
59 ConsoleExitOnNull(pfnCreate, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to get address for BootstrapperApplicationCreate.");
60
61 hr = pfnCreate(&args, m_pCreateResults);
62 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure on BootstrapperApplicationCreate.");
63
64LExit:
65 ReleaseStr(command.wzBootstrapperApplicationDataPath);
66 ReleaseStr(command.wzBootstrapperWorkingFolder);
67
68 return hr;
69}
70
71HRESULT TestEngine::Log(
72 __in BOOTSTRAPPER_LOG_LEVEL level,
73 __in LPCWSTR wzMessage
74 )
75{
76 switch (level)
77 {
78 case BOOTSTRAPPER_LOG_LEVEL_NONE:
79 case BOOTSTRAPPER_LOG_LEVEL_DEBUG:
80 return S_OK;
81 default:
82 LogStringLine(REPORT_STANDARD, "%ls", wzMessage);
83 return ConsoleWriteLine(CONSOLE_COLOR_NORMAL, "%ls", wzMessage);
84 }
85}
86
87HRESULT TestEngine::RunApplication()
88{
89 HRESULT hr = S_OK;
90 MSG msg = { };
91 BOOL fRet = FALSE;
92
93 // Enter the message pump.
94 while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0)))
95 {
96 if (-1 == fRet)
97 {
98 ConsoleExitOnFailure(hr = E_UNEXPECTED, CONSOLE_COLOR_RED, "Unexpected return value from message pump.");
99 }
100 else
101 {
102 ProcessBAMessage(&msg);
103 }
104 }
105
106LExit:
107 return hr;
108}
109
110HRESULT TestEngine::SendShutdownEvent(
111 __in BOOTSTRAPPER_SHUTDOWN_ACTION defaultAction
112 )
113{
114 HRESULT hr = S_OK;
115 BA_ONSHUTDOWN_ARGS shutdownArgs = { };
116 BA_ONSHUTDOWN_RESULTS shutdownResults = { };
117 shutdownArgs.cbSize = sizeof(BA_ONSHUTDOWN_ARGS);
118 shutdownResults.action = defaultAction;
119 shutdownResults.cbSize = sizeof(BA_ONSHUTDOWN_RESULTS);
120 hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &shutdownArgs, &shutdownResults, m_pCreateResults->pvBootstrapperApplicationProcContext);
121 return hr;
122}
123
124HRESULT TestEngine::SendStartupEvent()
125{
126 HRESULT hr = S_OK;
127 BA_ONSTARTUP_ARGS startupArgs = { };
128 BA_ONSTARTUP_RESULTS startupResults = { };
129 startupArgs.cbSize = sizeof(BA_ONSTARTUP_ARGS);
130 startupResults.cbSize = sizeof(BA_ONSTARTUP_RESULTS);
131 hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &startupArgs, &startupResults, m_pCreateResults->pvBootstrapperApplicationProcContext);
132 return hr;
133}
134
135HRESULT TestEngine::SimulateQuit(
136 __in DWORD dwExitCode
137 )
138{
139 BAENGINE_QUIT_ARGS args = { };
140 BAENGINE_QUIT_RESULTS results = { };
141
142 args.cbSize = sizeof(BAENGINE_QUIT_ARGS);
143 args.dwExitCode = dwExitCode;
144
145 results.cbSize = sizeof(BAENGINE_QUIT_RESULTS);
146
147 return BAEngineQuit(&args, &results);
148}
149
150void TestEngine::UnloadBA()
151{
152 PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL;
153 BOOL fDisableUnloading = m_pCreateResults && m_pCreateResults->fDisableUnloading;
154
155 ReleaseNullMem(m_pCreateResults);
156
157 pfnDestroy = (PFN_BOOTSTRAPPER_APPLICATION_DESTROY)::GetProcAddress(m_hBAModule, "BootstrapperApplicationDestroy");
158
159 if (pfnDestroy)
160 {
161 pfnDestroy();
162 }
163
164 if (m_hBAModule)
165 {
166 if (!fDisableUnloading)
167 {
168 ::FreeLibrary(m_hBAModule);
169 }
170
171 m_hBAModule = NULL;
172 }
173}
174
175HRESULT TestEngine::BAEngineLog(
176 __in BAENGINE_LOG_ARGS* pArgs,
177 __in BAENGINE_LOG_RESULTS* /*pResults*/
178 )
179{
180 return Log(pArgs->level, pArgs->wzMessage);
181}
182
183HRESULT TestEngine::BAEngineQuit(
184 __in BAENGINE_QUIT_ARGS* pArgs,
185 __in BAENGINE_QUIT_RESULTS* /*pResults*/
186 )
187{
188 HRESULT hr = S_OK;
189
190 if (!::PostThreadMessageW(m_dwThreadId, WM_TESTENG_QUIT, static_cast<WPARAM>(pArgs->dwExitCode), 0))
191 {
192 ConsoleExitWithLastError(hr, CONSOLE_COLOR_RED, "Failed to post shutdown message.");
193 }
194
195LExit:
196 return hr;
197}
198
199HRESULT WINAPI TestEngine::EngineProc(
200 __in BOOTSTRAPPER_ENGINE_MESSAGE message,
201 __in const LPVOID pvArgs,
202 __inout LPVOID pvResults,
203 __in_opt LPVOID pvContext
204 )
205{
206 HRESULT hr = S_OK;
207 TestEngine* pContext = (TestEngine*)pvContext;
208
209 if (!pContext || !pvArgs || !pvResults)
210 {
211 ExitFunction1(hr = E_INVALIDARG);
212 }
213
214 switch (message)
215 {
216 case BOOTSTRAPPER_ENGINE_MESSAGE_LOG:
217 hr = pContext->BAEngineLog(reinterpret_cast<BAENGINE_LOG_ARGS*>(pvArgs), reinterpret_cast<BAENGINE_LOG_RESULTS*>(pvResults));
218 break;
219 case BOOTSTRAPPER_ENGINE_MESSAGE_QUIT:
220 hr = pContext->BAEngineQuit(reinterpret_cast<BAENGINE_QUIT_ARGS*>(pvArgs), reinterpret_cast<BAENGINE_QUIT_RESULTS*>(pvResults));
221 default:
222 hr = E_NOTIMPL;
223 break;
224 }
225
226LExit:
227 return hr;
228}
229
230HRESULT TestEngine::ProcessBAMessage(
231 __in const MSG* pmsg
232 )
233{
234 HRESULT hr = S_OK;
235
236 switch (pmsg->message)
237 {
238 case WM_TESTENG_QUIT:
239 ::PostQuitMessage(static_cast<int>(pmsg->wParam)); // go bye-bye.
240 break;
241 }
242
243 return hr;
244}
245
246TestEngine::TestEngine()
247{
248 m_hBAModule = NULL;
249 m_pCreateResults = NULL;
250 m_dwThreadId = ::GetCurrentThreadId();
251}
252
253TestEngine::~TestEngine()
254{
255 ReleaseMem(m_pCreateResults);
256}
diff --git a/src/test/examples/TestEngine/TestEngine.h b/src/test/examples/TestEngine/TestEngine.h
deleted file mode 100644
index 44e813bd..00000000
--- a/src/test/examples/TestEngine/TestEngine.h
+++ /dev/null
@@ -1,80 +0,0 @@
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
5enum WM_TESTENG
6{
7 WM_TESTENG_FIRST = WM_APP + 0xFFF, // this enum value must always be first.
8
9 WM_TESTENG_DETECT,
10 WM_TESTENG_PLAN,
11 WM_TESTENG_ELEVATE,
12 WM_TESTENG_APPLY,
13 WM_TESTENG_LAUNCH_APPROVED_EXE,
14 WM_TESTENG_QUIT,
15
16 WM_TESTENG_LAST, // this enum value must always be last.
17};
18
19class TestEngine
20{
21public:
22 HRESULT Initialize(
23 __in LPCWSTR wzBundleFilePath
24 );
25
26 HRESULT LoadBA(
27 __in LPCWSTR wzBAFilePath
28 );
29
30 HRESULT Log(
31 __in BOOTSTRAPPER_LOG_LEVEL level,
32 __in LPCWSTR wzMessage
33 );
34
35 HRESULT RunApplication();
36
37 HRESULT SendShutdownEvent(
38 __in BOOTSTRAPPER_SHUTDOWN_ACTION defaultAction
39 );
40
41 HRESULT SendStartupEvent();
42
43 HRESULT SimulateQuit(
44 __in DWORD dwExitCode
45 );
46
47 void UnloadBA();
48
49private:
50 HRESULT BAEngineLog(
51 __in BAENGINE_LOG_ARGS* pArgs,
52 __in BAENGINE_LOG_RESULTS* pResults
53 );
54
55 HRESULT BAEngineQuit(
56 __in BAENGINE_QUIT_ARGS* pArgs,
57 __in BAENGINE_QUIT_RESULTS* pResults
58 );
59
60 static HRESULT WINAPI EngineProc(
61 __in BOOTSTRAPPER_ENGINE_MESSAGE message,
62 __in const LPVOID pvArgs,
63 __inout LPVOID pvResults,
64 __in_opt LPVOID pvContext
65 );
66
67 HRESULT ProcessBAMessage(
68 __in const MSG* pmsg
69 );
70
71public:
72 TestEngine();
73
74 ~TestEngine();
75
76private:
77 HMODULE m_hBAModule;
78 BOOTSTRAPPER_CREATE_RESULTS* m_pCreateResults;
79 DWORD m_dwThreadId;
80}; \ No newline at end of file
diff --git a/src/test/examples/TestEngine/WaitForQuitEngine.cpp b/src/test/examples/TestEngine/WaitForQuitEngine.cpp
deleted file mode 100644
index 2f80ba75..00000000
--- a/src/test/examples/TestEngine/WaitForQuitEngine.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
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
5HRESULT RunWaitForQuitEngine(
6 __in LPCWSTR wzBundleFilePath,
7 __in LPCWSTR wzBAFilePath
8 )
9{
10 HRESULT hr = S_OK;
11 TestEngine* pTestEngine = NULL;
12
13 pTestEngine = new TestEngine();
14 ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine.");
15
16 hr = pTestEngine->Initialize(wzBundleFilePath);
17 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine.");
18
19 hr = pTestEngine->LoadBA(wzBAFilePath);
20 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA.");
21
22 hr = pTestEngine->SendStartupEvent();
23 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup.");
24
25 hr = pTestEngine->RunApplication();
26 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine.");
27
28 hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER);
29 ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown.");
30
31 pTestEngine->UnloadBA();
32
33LExit:
34 return hr;
35}
diff --git a/src/test/examples/TestEngine/WaitForQuitEngine.h b/src/test/examples/TestEngine/WaitForQuitEngine.h
deleted file mode 100644
index 99e3f63c..00000000
--- a/src/test/examples/TestEngine/WaitForQuitEngine.h
+++ /dev/null
@@ -1,8 +0,0 @@
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
5HRESULT RunWaitForQuitEngine(
6 __in LPCWSTR wzBundleFilePath,
7 __in LPCWSTR wzBAFilePath
8 );
diff --git a/src/test/examples/TestEngine/packages.config b/src/test/examples/TestEngine/packages.config
deleted file mode 100644
index 548ddb48..00000000
--- a/src/test/examples/TestEngine/packages.config
+++ /dev/null
@@ -1,7 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<packages>
3 <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
4 <package id="WixToolset.BootstrapperCore.Native" version="4.0.141" targetFramework="native" />
5 <package id="WixToolset.BalUtil" version="4.0.58" targetFramework="native" />
6 <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" />
7</packages> \ No newline at end of file
diff --git a/src/test/examples/TestEngine/precomp.cpp b/src/test/examples/TestEngine/precomp.cpp
deleted file mode 100644
index 37664a1c..00000000
--- a/src/test/examples/TestEngine/precomp.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
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/examples/TestEngine/precomp.h b/src/test/examples/TestEngine/precomp.h
deleted file mode 100644
index f943f420..00000000
--- a/src/test/examples/TestEngine/precomp.h
+++ /dev/null
@@ -1,20 +0,0 @@
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#include <windows.h>
5#include <MsiQuery.h>
6
7#include "dutil.h"
8#include "conutil.h"
9#include "logutil.h"
10#include "memutil.h"
11#include "pathutil.h"
12#include "strutil.h"
13
14#include "BootstrapperEngine.h"
15#include "BootstrapperApplication.h"
16
17#include "TestEngine.h"
18#include "ReloadEngine.h"
19#include "ShutdownEngine.h"
20#include "WaitForQuitEngine.h"
diff --git a/src/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs b/src/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs
deleted file mode 100644
index 68d742b0..00000000
--- a/src/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs
+++ /dev/null
@@ -1,16 +0,0 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="FDDWPFCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication>
4 <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.deps.json" Name="Example.WPFCoreMBA.deps.json" />
5 <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.dll" Name="Example.WPFCoreMBA.dll" bal:BAFactoryAssembly="yes" />
6 <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.pdb" Name="Example.WPFCoreMBA.pdb" />
7 <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.runtimeconfig.json" Name="Example.WPFCoreMBA.runtimeconfig.json" />
8 <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" />
9 <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" />
10 <bal:WixDotNetCoreBootstrapperApplicationHost />
11 </BootstrapperApplication>
12 <Chain>
13 <ExePackage DetectCondition="none" SourceFile="c:\windows\system32\kernel32.dll" bal:PrereqPackage="yes" />
14 </Chain>
15 </Bundle>
16</Wix>
diff --git a/src/test/examples/WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj b/src/test/examples/WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj
deleted file mode 100644
index ba75a9ff..00000000
--- a/src/test/examples/WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj
+++ /dev/null
@@ -1,2 +0,0 @@
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<Project Sdk="WixToolset.Sdk" />
diff --git a/src/test/examples/WPFCoreMBA/AssemblyInfo.cs b/src/test/examples/WPFCoreMBA/AssemblyInfo.cs
deleted file mode 100644
index 03a5c7fa..00000000
--- a/src/test/examples/WPFCoreMBA/AssemblyInfo.cs
+++ /dev/null
@@ -1,12 +0,0 @@
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.Windows;
4
5[assembly:ThemeInfo(
6 ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
7 //(used if a resource is not found in the page,
8 // or application resource dictionaries)
9 ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
10 //(used if a resource is not found in the page,
11 // app, or any theme specific resource dictionaries)
12)]
diff --git a/src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj b/src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj
deleted file mode 100644
index 296e5be9..00000000
--- a/src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
1<Project Sdk="Microsoft.NET.Sdk">
2
3 <PropertyGroup>
4 <TargetFramework>net5.0-windows</TargetFramework>
5 <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
6 <EnableDynamicLoading>true</EnableDynamicLoading>
7 <Description>WPF .NET Core MBA</Description>
8 <UseWPF>true</UseWPF>
9 </PropertyGroup>
10
11
12 <ItemGroup>
13 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
14 <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
15 </ItemGroup>
16</Project> \ No newline at end of file
diff --git a/src/test/examples/WPFCoreMBA/MainWindow.xaml b/src/test/examples/WPFCoreMBA/MainWindow.xaml
deleted file mode 100644
index 40a27a06..00000000
--- a/src/test/examples/WPFCoreMBA/MainWindow.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
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<Window x:Class="Example.WPFCoreMBA.MainWindow"
6 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
7 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
8 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
9 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
10 xmlns:local="clr-namespace:Example.WPFCoreMBA"
11 mc:Ignorable="d"
12 Title="MainWindow" Height="450" Width="800">
13 <Grid>
14
15 </Grid>
16</Window>
diff --git a/src/test/examples/WPFCoreMBA/MainWindow.xaml.cs b/src/test/examples/WPFCoreMBA/MainWindow.xaml.cs
deleted file mode 100644
index 4f61b807..00000000
--- a/src/test/examples/WPFCoreMBA/MainWindow.xaml.cs
+++ /dev/null
@@ -1,17 +0,0 @@
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
3namespace Example.WPFCoreMBA
4{
5 using System.Windows;
6
7 /// <summary>
8 /// Interaction logic for MainWindow.xaml
9 /// </summary>
10 public partial class MainWindow : Window
11 {
12 public MainWindow()
13 {
14 this.InitializeComponent();
15 }
16 }
17}
diff --git a/src/test/examples/WPFCoreMBA/WPFCoreBA.cs b/src/test/examples/WPFCoreMBA/WPFCoreBA.cs
deleted file mode 100644
index d50be813..00000000
--- a/src/test/examples/WPFCoreMBA/WPFCoreBA.cs
+++ /dev/null
@@ -1,42 +0,0 @@
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
3namespace Example.WPFCoreMBA
4{
5 using System.Windows.Threading;
6 using WixToolset.Mba.Core;
7
8 public class WPFCoreBA : BootstrapperApplication
9 {
10 public WPFCoreBA(IEngine engine)
11 : base(engine)
12 {
13 }
14
15 public Dispatcher BADispatcher { get; private set; }
16
17 protected override void Run()
18 {
19 this.BADispatcher = Dispatcher.CurrentDispatcher;
20 var window = new MainWindow();
21 window.Closed += (s, e) => this.BADispatcher.InvokeShutdown();
22 //window.Show();
23 //Dispatcher.Run();
24 //this.engine.Quit(0);
25 }
26
27 protected override void OnStartup(StartupEventArgs args)
28 {
29 base.OnStartup(args);
30
31 this.engine.Log(LogLevel.Standard, nameof(WPFCoreBA));
32 }
33
34 protected override void OnShutdown(ShutdownEventArgs args)
35 {
36 base.OnShutdown(args);
37
38 var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString();
39 this.engine.Log(LogLevel.Standard, message);
40 }
41 }
42}
diff --git a/src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs b/src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs
deleted file mode 100644
index a3ccdf9f..00000000
--- a/src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs
+++ /dev/null
@@ -1,22 +0,0 @@
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[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.WPFCoreMBA.WPFCoreBAFactory))]
4namespace Example.WPFCoreMBA
5{
6 using WixToolset.Mba.Core;
7
8 public class WPFCoreBAFactory : BaseBootstrapperApplicationFactory
9 {
10 private static int loadCount = 0;
11
12 protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand)
13 {
14 if (loadCount > 0)
15 {
16 engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)");
17 }
18 ++loadCount;
19 return new WPFCoreBA(engine);
20 }
21 }
22}
diff --git a/src/test/examples/Wix.Build.props b/src/test/examples/Wix.Build.props
deleted file mode 100644
index aad94bb6..00000000
--- a/src/test/examples/Wix.Build.props
+++ /dev/null
@@ -1,10 +0,0 @@
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>
4 <PropertyGroup>
5 <OutputType>Bundle</OutputType>
6 <TargetExt>.exe</TargetExt>
7 <HarvestDirectoryAdditionalOptions>-generate payloadgroup</HarvestDirectoryAdditionalOptions>
8 <OutputPath>$(OutputPath)examples\</OutputPath>
9 </PropertyGroup>
10</Project>
diff --git a/src/test/examples/Wix.Build.targets b/src/test/examples/Wix.Build.targets
deleted file mode 100644
index 7e6fe9f2..00000000
--- a/src/test/examples/Wix.Build.targets
+++ /dev/null
@@ -1,8 +0,0 @@
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>
4 <ItemGroup>
5 <BindInputPaths Include="$(OutputPath)" />
6 <WixExtension Include="$(OutputPath)..\netstandard2.0\WixToolset.Bal.wixext.dll" />
7 </ItemGroup>
8</Project>
diff --git a/src/test/examples/examples.proj b/src/test/examples/examples.proj
deleted file mode 100644
index 08cb7511..00000000
--- a/src/test/examples/examples.proj
+++ /dev/null
@@ -1,50 +0,0 @@
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<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <Import Project="..\..\Directory.Build.props" />
7
8 <PropertyGroup>
9 <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath>
10 <FullFramework2MBAProjectPath>FullFramework2MBA\Example.FullFramework2MBA.csproj</FullFramework2MBAProjectPath>
11 <FullFramework4MBAProjectPath>FullFramework4MBA\Example.FullFramework4MBA.csproj</FullFramework4MBAProjectPath>
12 <LatestCoreMBAProjectPath>LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath>
13 <WPFCoreMBAProjectPath>WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath>
14 <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath>
15 </PropertyGroup>
16
17 <ItemGroup>
18 <CoreMBAProject Include="$(EarliestCoreMBAProjectPath)">
19 <PublishPath>$(MBAPublishPath)Example.EarliestCoreMBA</PublishPath>
20 </CoreMBAProject>
21 <CoreMBAProject Include="$(LatestCoreMBAProjectPath)">
22 <PublishPath>$(MBAPublishPath)Example.LatestCoreMBA</PublishPath>
23 </CoreMBAProject>
24 <CoreMBAProject Include="$(WPFCoreMBAProjectPath)">
25 <PublishPath>$(MBAPublishPath)Example.WPFCoreMBA</PublishPath>
26 <SkipSCD>true</SkipSCD>
27 <SkipTrimmedSCD>true</SkipTrimmedSCD>
28 </CoreMBAProject>
29
30 <FullMBAProject Include="$(FullFramework2MBAProjectPath)" />
31 <FullMBAProject Include="$(FullFramework4MBAProjectPath)" />
32
33 <ExampleBundleProject Include="**\*.wixproj" />
34 </ItemGroup>
35
36 <Target Name="PublishCoreExamples">
37 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
38 Condition="'%(CoreMBAProject.SkipFDD)'==''" />
39 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x86 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"'
40 Condition="'%(CoreMBAProject.SkipSCD)'==''" />
41 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x86 -c $(Configuration) --self-contained true -p:PublishTrimmed=true "%(CoreMBAProject.Identity)"'
42 Condition="'%(CoreMBAProject.SkipTrimmedSCD)'==''" />
43 </Target>
44
45 <Target Name="Build" DependsOnTargets="PublishCoreExamples">
46 <MSBuild Projects="%(ExampleBundleProject.Identity)" />
47 </Target>
48
49 <Import Project="..\..\Directory.Build.targets" />
50</Project> \ No newline at end of file