More .NET 5 updates.
Fix tests when running on machine with .NET 5. Update frameworks for .NET Core MBA (3.1 vs 5.0).
Sean Hall committed
Nov 2, 2020 at 19:43 UTC
20ea356b2c0b4ab4d29778b4958d5b363f735f1f
12 files changed
+37
-23
appveyor.yml
+1
-1
@@ -8,7 +8,7 @@ branches:
8
- master
9
- develop
10
11
-image: Visual Studio 2019
11
+image: Visual Studio 2019 Preview
12
13
version: 0.0.0.{build}
14
configuration: Release
global.json
+2
-2
@@ -1,8 +1,8 @@
1
{
2
"msbuild-sdks": {
3
- "WixToolset.Sdk": "4.0.0-build-0163"
3
+ "WixToolset.Sdk": "4.0.0-build-0164"
4
},
5
"sdk": {
6
- "allowPrerelease": false
6
+ "allowPrerelease": true
7
}
8
}
src/dnchost/dnchost.vcxproj
+1
-1
@@ -28,7 +28,7 @@
28
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
30
<PropertyGroup>
31
- <NetHostPath>..\..\packages\runtime.win-x86.Microsoft.NETCore.DotNetAppHost.5.0.0-preview.7.20364.11\runtimes\win-x86\native\</NetHostPath>
31
+ <NetHostPath>..\..\packages\runtime.win-x86.Microsoft.NETCore.DotNetAppHost.5.0.0-rc.2.20475.5\runtimes\win-x86\native\</NetHostPath>
32
<ProjectAdditionalLinkLibraries>shlwapi.lib;$(NetHostPath)libnethost.lib</ProjectAdditionalLinkLibraries>
33
</PropertyGroup>
34
<ItemGroup>
src/dnchost/dncutil.cpp
+8
-1
@@ -182,7 +182,14 @@ static void HOSTFXR_CALLTYPE DnchostErrorWriter(
182
__in LPCWSTR wzMessage
183
)
184
{
185
- BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "error from hostfxr: %ls", wzMessage);
185
+ BOOTSTRAPPER_LOG_LEVEL level = BOOTSTRAPPER_LOG_LEVEL_ERROR;
186
+
187
+ if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, 0, wzMessage, -1, L"The requested delegate type is not available in the target framework.", -1))
188
+ {
189
+ level = BOOTSTRAPPER_LOG_LEVEL_DEBUG;
190
+ }
191
+
192
+ BalLog(level, "error from hostfxr: %ls", wzMessage);
193
}
194
195
static HRESULT InitializeHostfxr(
src/dnchost/packages.config
+1
-1
@@ -4,7 +4,7 @@
4
<package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" />
5
<package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" />
6
<package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
7
- <package id="runtime.win-x86.Microsoft.NETCore.DotNetAppHost" version="5.0.0-preview.7.20364.11" targetFramework="native" />
7
+ <package id="runtime.win-x86.Microsoft.NETCore.DotNetAppHost" version="5.0.0-rc.2.20475.5" targetFramework="native" />
8
<package id="WixToolset.BalUtil" version="4.0.41" targetFramework="native" />
9
<package id="WixToolset.BootstrapperCore.Native" version="4.0.38" targetFramework="native" />
10
<package id="WixToolset.DUtil" version="4.0.55" targetFramework="native" />
src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj
+2
-2
@@ -1,7 +1,7 @@
1
<Project Sdk="Microsoft.NET.Sdk">
2
3
<PropertyGroup>
4
- <TargetFramework>netcoreapp3.0</TargetFramework>
4
+ <TargetFramework>netcoreapp3.1</TargetFramework>
5
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
6
<EnableDynamicLoading>true</EnableDynamicLoading>
7
<Description>Earliest .NET Core MBA</Description>
@@ -13,6 +13,6 @@
13
14
<ItemGroup>
15
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
16
- <PackageReference Include="WixToolset.Mba.Core" Version="4.0.41" />
16
+ <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
17
</ItemGroup>
18
</Project>
\ No newline at end of file
src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj
+1
-1
@@ -15,6 +15,6 @@
15
</ItemGroup>
16
17
<ItemGroup>
18
- <PackageReference Include="WixToolset.Mba.Core" Version="4.0.41" />
18
+ <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
19
</ItemGroup>
20
</Project>
\ No newline at end of file
src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj
+1
-1
@@ -10,7 +10,7 @@
10
11
<ItemGroup>
12
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
13
- <PackageReference Include="WixToolset.Mba.Core" Version="4.0.41" PrivateAssets="All" />
13
+ <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" PrivateAssets="All" />
14
</ItemGroup>
15
16
<ItemGroup>
src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj
+5
-7
@@ -1,23 +1,21 @@
1
<Project Sdk="Microsoft.NET.Sdk">
2
3
<PropertyGroup>
4
- <TargetFramework>netcoreapp3.1</TargetFramework>
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
- <PropertyGroup Condition="'$(PublishTrimmed)'=='true'">
11
- <PublishReadyToRunShowWarnings>false</PublishReadyToRunShowWarnings>
12
- <PublishReadyToRun>true</PublishReadyToRun>
13
- </PropertyGroup>
14
-
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" />
21
- <PackageReference Include="WixToolset.Mba.Core" Version="4.0.41" />
19
+ <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
20
</ItemGroup>
21
</Project>
\ No newline at end of file
src/test/examples/TestEngine/TestEngine.cpp
+11
-3
@@ -69,11 +69,19 @@ LExit:
69
}
70
71
HRESULT TestEngine::Log(
72
+ __in BOOTSTRAPPER_LOG_LEVEL level,
73
__in LPCWSTR wzMessage
74
)
75
{
75
- LogStringLine(REPORT_STANDARD, "%ls", wzMessage);
76
- return ConsoleWriteLine(CONSOLE_COLOR_NORMAL, "%ls", wzMessage);
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
87
HRESULT TestEngine::RunApplication()
@@ -169,7 +177,7 @@ HRESULT TestEngine::BAEngineLog(
177
__in BAENGINE_LOG_RESULTS* /*pResults*/
178
)
179
{
172
- return Log(pArgs->wzMessage);
180
+ return Log(pArgs->level, pArgs->wzMessage);
181
}
182
183
HRESULT TestEngine::BAEngineQuit(
src/test/examples/TestEngine/TestEngine.h
+1
@@ -28,6 +28,7 @@ public:
28
);
29
30
HRESULT Log(
31
+ __in BOOTSTRAPPER_LOG_LEVEL level,
32
__in LPCWSTR wzMessage
33
);
34
src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj
+3
-3
@@ -1,7 +1,7 @@
1
-<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
1
+<Project Sdk="Microsoft.NET.Sdk">
2
3
<PropertyGroup>
4
- <TargetFramework>netcoreapp3.1</TargetFramework>
4
+ <TargetFramework>net5.0-windows</TargetFramework>
5
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
6
<EnableDynamicLoading>true</EnableDynamicLoading>
7
<Description>WPF .NET Core MBA</Description>
@@ -11,6 +11,6 @@
11
12
<ItemGroup>
13
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
14
- <PackageReference Include="WixToolset.Mba.Core" Version="4.0.41" />
14
+ <PackageReference Include="WixToolset.Mba.Core" Version="4.0.*" />
15
</ItemGroup>
16
</Project>
\ No newline at end of file