diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-04-20 15:30:08 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-04-20 16:34:16 -0500 |
commit | b82c6a2b7d451212fb0b2e32ca4d5d86c953d81a (patch) | |
tree | 6405c7522555b8ba404b84a6d187c0f8f95d42d8 /src/ext | |
parent | 96ce05107d0e01014a3264e91ecb5731a9f28cc5 (diff) | |
download | wix-b82c6a2b7d451212fb0b2e32ca4d5d86c953d81a.tar.gz wix-b82c6a2b7d451212fb0b2e32ca4d5d86c953d81a.tar.bz2 wix-b82c6a2b7d451212fb0b2e32ca4d5d86c953d81a.zip |
Upgrade dnchost's nethost dependency to .NET 6.0.4.
Diffstat (limited to 'src/ext')
11 files changed, 108 insertions, 11 deletions
diff --git a/src/ext/Bal/bal.cmd b/src/ext/Bal/bal.cmd index 8864bbb6..7a005cfe 100644 --- a/src/ext/Bal/bal.cmd +++ b/src/ext/Bal/bal.cmd | |||
@@ -22,6 +22,10 @@ msbuild -p:Configuration=%_C%;Platform=x86 mbahost\mbahost.vcxproj || exit /b | |||
22 | msbuild -p:Configuration=%_C%;Platform=x64 mbahost\mbahost.vcxproj || exit /b | 22 | msbuild -p:Configuration=%_C%;Platform=x64 mbahost\mbahost.vcxproj || exit /b |
23 | msbuild -p:Configuration=%_C%;Platform=ARM64 mbahost\mbahost.vcxproj || exit /b | 23 | msbuild -p:Configuration=%_C%;Platform=ARM64 mbahost\mbahost.vcxproj || exit /b |
24 | 24 | ||
25 | msbuild -p:Configuration=%_C%;Platform=x86 test\examples\TestEngine\Example.TestEngine.vcxproj || exit /b | ||
26 | msbuild -p:Configuration=%_C%;Platform=x64 test\examples\TestEngine\Example.TestEngine.vcxproj || exit /b | ||
27 | msbuild -p:Configuration=%_C%;Platform=ARM64 test\examples\TestEngine\Example.TestEngine.vcxproj || exit /b | ||
28 | |||
25 | msbuild -p:Configuration=%_C% || exit /b | 29 | msbuild -p:Configuration=%_C% || exit /b |
26 | 30 | ||
27 | dotnet test test\WixToolsetTest.Dnc.HostGenerator -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Dnc.HostGenerator.trx" || exit /b | 31 | dotnet test test\WixToolsetTest.Dnc.HostGenerator -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Dnc.HostGenerator.trx" || exit /b |
diff --git a/src/ext/Bal/dnchost/dnchost.vcxproj b/src/ext/Bal/dnchost/dnchost.vcxproj index 1fd2ebed..ca0c09d6 100644 --- a/src/ext/Bal/dnchost/dnchost.vcxproj +++ b/src/ext/Bal/dnchost/dnchost.vcxproj | |||
@@ -49,7 +49,7 @@ | |||
49 | <PropertyGroup> | 49 | <PropertyGroup> |
50 | <NetHostPlatform>$(Platform)</NetHostPlatform> | 50 | <NetHostPlatform>$(Platform)</NetHostPlatform> |
51 | <NetHostPlatform Condition=" '$(NetHostPlatform)'=='Win32' ">x86</NetHostPlatform> | 51 | <NetHostPlatform Condition=" '$(NetHostPlatform)'=='Win32' ">x86</NetHostPlatform> |
52 | <NetHostPath>..\..\..\..\packages\runtime.win-$(NetHostPlatform).Microsoft.NETCore.DotNetAppHost.5.0.0\runtimes\win-$(NetHostPlatform)\native\</NetHostPath> | 52 | <NetHostPath>..\..\..\..\packages\runtime.win-$(NetHostPlatform).Microsoft.NETCore.DotNetAppHost.6.0.4\runtimes\win-$(NetHostPlatform)\native\</NetHostPath> |
53 | <ProjectAdditionalIncludeDirectories>$(BaseOutputPath)obj;$(NetHostPath)</ProjectAdditionalIncludeDirectories> | 53 | <ProjectAdditionalIncludeDirectories>$(BaseOutputPath)obj;$(NetHostPath)</ProjectAdditionalIncludeDirectories> |
54 | <ProjectAdditionalLinkLibraries>shlwapi.lib;$(NetHostPath)libnethost.lib</ProjectAdditionalLinkLibraries> | 54 | <ProjectAdditionalLinkLibraries>shlwapi.lib;$(NetHostPath)libnethost.lib</ProjectAdditionalLinkLibraries> |
55 | </PropertyGroup> | 55 | </PropertyGroup> |
diff --git a/src/ext/Bal/dnchost/packages.config b/src/ext/Bal/dnchost/packages.config index 78fa970f..1c7505e7 100644 --- a/src/ext/Bal/dnchost/packages.config +++ b/src/ext/Bal/dnchost/packages.config | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <packages> | 2 | <packages> |
3 | <package id="runtime.win-arm64.Microsoft.NETCore.DotNetAppHost" version="5.0.0" targetFramework="native" /> | 3 | <package id="runtime.win-arm64.Microsoft.NETCore.DotNetAppHost" version="6.0.4" targetFramework="native" /> |
4 | <package id="runtime.win-x64.Microsoft.NETCore.DotNetAppHost" version="5.0.0" targetFramework="native" /> | 4 | <package id="runtime.win-x64.Microsoft.NETCore.DotNetAppHost" version="6.0.4" targetFramework="native" /> |
5 | <package id="runtime.win-x86.Microsoft.NETCore.DotNetAppHost" version="5.0.0" targetFramework="native" /> | 5 | <package id="runtime.win-x86.Microsoft.NETCore.DotNetAppHost" version="6.0.4" targetFramework="native" /> |
6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs index 14b80fe8..25856f4d 100644 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs +++ b/src/ext/Bal/test/WixToolsetTest.ManagedHost/DncHostFixture.cs | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | namespace WixToolsetTest.ManagedHost | 3 | namespace WixToolsetTest.ManagedHost |
4 | { | 4 | { |
5 | using System; | ||
5 | using WixBuildTools.TestSupport; | 6 | using WixBuildTools.TestSupport; |
6 | using Xunit; | 7 | using Xunit; |
7 | 8 | ||
@@ -29,6 +30,29 @@ namespace WixToolsetTest.ManagedHost | |||
29 | } | 30 | } |
30 | } | 31 | } |
31 | 32 | ||
33 | [Fact(Skip = "Requires .NET Core 3.1 x86 runtime which might be missing")] | ||
34 | public void CanLoadFDDx86EarliestCoreMBA() | ||
35 | { | ||
36 | // https://github.com/microsoft/vstest/issues/3586 | ||
37 | Environment.SetEnvironmentVariable("DOTNET_ROOT", null); | ||
38 | |||
39 | using (var fs = new DisposableFileSystem()) | ||
40 | { | ||
41 | var baseFolder = fs.GetFolder(); | ||
42 | var bundleFile = TestData.Get(bundleBasePath, "EarliestCoreBundleFDDx86.exe"); | ||
43 | var testEngine = new TestEngine(); | ||
44 | |||
45 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder, x86: true); | ||
46 | WixAssert.CompareLineByLine(new[] | ||
47 | { | ||
48 | "Loading .NET Core FDD bootstrapper application.", | ||
49 | "Creating BA thread to run asynchronously.", | ||
50 | "EarliestCoreBA", | ||
51 | "Shutdown,ReloadBootstrapper,0", | ||
52 | }, result.Output.ToArray()); | ||
53 | } | ||
54 | } | ||
55 | |||
32 | [Fact] | 56 | [Fact] |
33 | public void CanLoadSCDEarliestCoreMBA() | 57 | public void CanLoadSCDEarliestCoreMBA() |
34 | { | 58 | { |
@@ -116,6 +140,29 @@ namespace WixToolsetTest.ManagedHost | |||
116 | } | 140 | } |
117 | 141 | ||
118 | [Fact] | 142 | [Fact] |
143 | public void CanLoadFDDx86LatestCoreMBA() | ||
144 | { | ||
145 | // https://github.com/microsoft/vstest/issues/3586 | ||
146 | Environment.SetEnvironmentVariable("DOTNET_ROOT", null); | ||
147 | |||
148 | using (var fs = new DisposableFileSystem()) | ||
149 | { | ||
150 | var baseFolder = fs.GetFolder(); | ||
151 | var bundleFile = TestData.Get(bundleBasePath, "LatestCoreBundleFDDx86.exe"); | ||
152 | var testEngine = new TestEngine(); | ||
153 | |||
154 | var result = testEngine.RunShutdownEngine(bundleFile, baseFolder, x86: true); | ||
155 | WixAssert.CompareLineByLine(new[] | ||
156 | { | ||
157 | "Loading .NET Core FDD bootstrapper application.", | ||
158 | "Creating BA thread to run asynchronously.", | ||
159 | "LatestCoreBA", | ||
160 | "Shutdown,ReloadBootstrapper,0", | ||
161 | }, result.Output.ToArray()); | ||
162 | } | ||
163 | } | ||
164 | |||
165 | [Fact] | ||
119 | public void CanReloadFDDLatestCoreMBA() | 166 | public void CanReloadFDDLatestCoreMBA() |
120 | { | 167 | { |
121 | using (var fs = new DisposableFileSystem()) | 168 | using (var fs = new DisposableFileSystem()) |
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs b/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs index 4df52e87..0ca2b40f 100644 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs +++ b/src/ext/Bal/test/WixToolsetTest.ManagedHost/TestEngine.cs | |||
@@ -12,18 +12,19 @@ namespace WixToolsetTest.ManagedHost | |||
12 | public class TestEngine | 12 | public class TestEngine |
13 | { | 13 | { |
14 | private static readonly string TestEngineFile = TestData.Get(@"..\x64\examples\Example.TestEngine\Example.TestEngine.exe"); | 14 | private static readonly string TestEngineFile = TestData.Get(@"..\x64\examples\Example.TestEngine\Example.TestEngine.exe"); |
15 | private static readonly string TestEngineFileX86 = TestData.Get(@"..\x86\examples\Example.TestEngine\Example.TestEngine.exe"); | ||
15 | 16 | ||
16 | public TestEngineResult RunReloadEngine(string bundleFilePath, string tempFolderPath) | 17 | public TestEngineResult RunReloadEngine(string bundleFilePath, string tempFolderPath, bool x86 = false) |
17 | { | 18 | { |
18 | return this.RunTestEngine("reload", bundleFilePath, tempFolderPath); | 19 | return this.RunTestEngine("reload", bundleFilePath, tempFolderPath, x86); |
19 | } | 20 | } |
20 | 21 | ||
21 | public TestEngineResult RunShutdownEngine(string bundleFilePath, string tempFolderPath) | 22 | public TestEngineResult RunShutdownEngine(string bundleFilePath, string tempFolderPath, bool x86 = false) |
22 | { | 23 | { |
23 | return this.RunTestEngine("shutdown", bundleFilePath, tempFolderPath); | 24 | return this.RunTestEngine("shutdown", bundleFilePath, tempFolderPath, x86); |
24 | } | 25 | } |
25 | 26 | ||
26 | private TestEngineResult RunTestEngine(string engineMode, string bundleFilePath, string tempFolderPath) | 27 | private TestEngineResult RunTestEngine(string engineMode, string bundleFilePath, string tempFolderPath, bool x86 = false) |
27 | { | 28 | { |
28 | var baFolderPath = Path.Combine(tempFolderPath, "ba"); | 29 | var baFolderPath = Path.Combine(tempFolderPath, "ba"); |
29 | var extractFolderPath = Path.Combine(tempFolderPath, "extract"); | 30 | var extractFolderPath = Path.Combine(tempFolderPath, "extract"); |
@@ -35,7 +36,7 @@ namespace WixToolsetTest.ManagedHost | |||
35 | '"' + bundleFilePath + '"', | 36 | '"' + bundleFilePath + '"', |
36 | '"' + extractResult.GetBAFilePath(baFolderPath) + '"', | 37 | '"' + extractResult.GetBAFilePath(baFolderPath) + '"', |
37 | }; | 38 | }; |
38 | return RunProcessCaptureOutput(TestEngineFile, args); | 39 | return RunProcessCaptureOutput(x86 ? TestEngineFileX86 : TestEngineFile, args); |
39 | } | 40 | } |
40 | 41 | ||
41 | private static TestEngineResult RunProcessCaptureOutput(string executablePath, string[] arguments = null, string workingFolder = null) | 42 | private static TestEngineResult RunProcessCaptureOutput(string executablePath, string[] arguments = null, string workingFolder = null) |
diff --git a/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj b/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj index 16dbec94..a55beac7 100644 --- a/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj +++ b/src/ext/Bal/test/WixToolsetTest.ManagedHost/WixToolsetTest.ManagedHost.csproj | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 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. --> | 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 | 3 | ||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="Microsoft.NET.Sdk"> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/EarliestCoreBundleFDDx86.wixproj b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/EarliestCoreBundleFDDx86.wixproj new file mode 100644 index 00000000..470ee042 --- /dev/null +++ b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/EarliestCoreBundleFDDx86.wixproj | |||
@@ -0,0 +1,6 @@ | |||
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 | <PropertyGroup> | ||
4 | <InstallerPlatform>x86</InstallerPlatform> | ||
5 | </PropertyGroup> | ||
6 | </Project> | ||
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs new file mode 100644 index 00000000..3672fc1d --- /dev/null +++ b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs | |||
@@ -0,0 +1,15 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
2 | <Bundle Name="FDDx86EarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{3D4A29A0-8AAE-4831-A9CF-E34AC298097D}"> | ||
3 | <BootstrapperApplication> | ||
4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> | ||
5 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | ||
6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> | ||
7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> | ||
8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | ||
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | ||
10 | </BootstrapperApplication> | ||
11 | <Chain> | ||
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | ||
13 | </Chain> | ||
14 | </Bundle> | ||
15 | </Wix> | ||
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs new file mode 100644 index 00000000..15dd290a --- /dev/null +++ b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs | |||
@@ -0,0 +1,15 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | ||
2 | <Bundle Name="FDDx86LatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{E547C546-5E0E-4BF9-A675-BBEF4C77FF0D}"> | ||
3 | <BootstrapperApplication> | ||
4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> | ||
5 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | ||
6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> | ||
7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> | ||
8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | ||
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | ||
10 | </BootstrapperApplication> | ||
11 | <Chain> | ||
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | ||
13 | </Chain> | ||
14 | </Bundle> | ||
15 | </Wix> | ||
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/LatestCoreBundleFDDx86.wixproj b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/LatestCoreBundleFDDx86.wixproj new file mode 100644 index 00000000..470ee042 --- /dev/null +++ b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/LatestCoreBundleFDDx86.wixproj | |||
@@ -0,0 +1,6 @@ | |||
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 | <PropertyGroup> | ||
4 | <InstallerPlatform>x86</InstallerPlatform> | ||
5 | </PropertyGroup> | ||
6 | </Project> | ||
diff --git a/src/ext/Bal/test/examples/examples.proj b/src/ext/Bal/test/examples/examples.proj index 20d4ecd5..82a5e3c1 100644 --- a/src/ext/Bal/test/examples/examples.proj +++ b/src/ext/Bal/test/examples/examples.proj | |||
@@ -25,6 +25,7 @@ | |||
25 | </CoreMBAProject> | 25 | </CoreMBAProject> |
26 | <CoreMBAProject Include="$(WPFCoreMBAProjectPath)"> | 26 | <CoreMBAProject Include="$(WPFCoreMBAProjectPath)"> |
27 | <PublishPath>$(MBAPublishPath)Example.WPFCoreMBA</PublishPath> | 27 | <PublishPath>$(MBAPublishPath)Example.WPFCoreMBA</PublishPath> |
28 | <SkipFDDx86>true</SkipFDDx86> | ||
28 | <SkipSCD>true</SkipSCD> | 29 | <SkipSCD>true</SkipSCD> |
29 | </CoreMBAProject> | 30 | </CoreMBAProject> |
30 | 31 | ||
@@ -35,6 +36,8 @@ | |||
35 | </ItemGroup> | 36 | </ItemGroup> |
36 | 37 | ||
37 | <Target Name="PublishCoreExamples"> | 38 | <Target Name="PublishCoreExamples"> |
39 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd-x86" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"' | ||
40 | Condition="'%(CoreMBAProject.SkipFDDx86)'==''" /> | ||
38 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x64 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"' | 41 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x64 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"' |
39 | Condition="'%(CoreMBAProject.SkipFDD)'==''" /> | 42 | Condition="'%(CoreMBAProject.SkipFDD)'==''" /> |
40 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x64 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"' | 43 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x64 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"' |