From 7e875ccb600a3ffcfd027d2cb33fc78abad79759 Mon Sep 17 00:00:00 2001
From: Ryland <41491307+ryalanms@users.noreply.github.com>
Date: Tue, 18 May 2021 10:57:04 -0700
Subject: [PATCH] Fixes and workarounds for various issues with the most recent
SDK and dependency updates
These changes are necessary to take the most dependency updates required for the Preview 5 branch snap.
* Add temporary workaround for SDK props import issue with C++/CLI projects
* Suppress obsolete API warning: This API will be added to the release notes as 'not supported'.
* Add System.Runtime.Loader now required by PresentationUI
---
eng/WpfArcadeSdk/tools/Wpf.Cpp.props | 5 +++++
.../Windows/Documents/Serialization/SerializerDescriptor.cs | 4 ++++
.../src/PresentationUI/PresentationUI.csproj | 1 +
3 files changed, 10 insertions(+)
diff --git a/eng/WpfArcadeSdk/tools/Wpf.Cpp.props b/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
index 06affe49a8c..54b4c44f5b4 100644
--- a/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
+++ b/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
@@ -8,6 +8,11 @@
10.0.19041.0
+
+
+
+
+ DummyPropertyValueForILLinkTasksAssembly
DynamicLibrary
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerDescriptor.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerDescriptor.cs
index f879aa792bd..aa5a58d840f 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerDescriptor.cs
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/Serialization/SerializerDescriptor.cs
@@ -202,7 +202,11 @@ internal static SerializerDescriptor CreateFromRegistry(RegistryKey plugIns, str
if (sd != null)
{
+ // This will be noted in the release notes as an unsupported API until 4479 is fixed.
+ // https://github.com/dotnet/wpf/issues/4479
+ #pragma warning disable SYSLIB0018 // 'Assembly.ReflectionOnlyLoadFrom(string)' is obsolete: 'ReflectionOnly loading is not su pported and throws PlatformNotSupportedException.'
Assembly plugIn = Assembly.ReflectionOnlyLoadFrom(sd._assemblyPath);
+ #pragma warning restore SYSLIB0018 // 'Assembly.ReflectionOnlyLoadFrom(string)' is obsolete: 'ReflectionOnly loading is not supported and throws PlatformNotSupportedException.'
if (typeof(System.Windows.Controls.Button).Assembly.GetName().Version == sd._winFXVersion &&
plugIn != null &&
plugIn.GetName().Version == sd._assemblyVersion)
diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationUI/PresentationUI.csproj b/src/Microsoft.DotNet.Wpf/src/PresentationUI/PresentationUI.csproj
index b1a2b4ee490..63e6c572158 100644
--- a/src/Microsoft.DotNet.Wpf/src/PresentationUI/PresentationUI.csproj
+++ b/src/Microsoft.DotNet.Wpf/src/PresentationUI/PresentationUI.csproj
@@ -253,6 +253,7 @@
+