From c06f928c3f39dc41ce461748e40d20d8cb4e530f Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Mon, 2 Mar 2020 16:42:43 +1100 Subject: [PATCH] fix: Restore missing TF for System.Windows.Forms.HighDpiMode Resolves #2925 `System.Windows.Forms.HighDpiMode` was accidentally placed under `Internal` namespace, which caused a missing type-forward decoration. This resulted in users receiving the following error when attempting to roll forward from .NET Core 3.x to .NET 5: ``` System.MissingMethodException : Method not found: 'Boolean System.Windows.Forms.Application.SetHighDpiMode(System.Windows.Forms.HighDpiMode)'. ``` Move the type into the correct location and add the missing `TypeForward` decoration. --- .../src/System/Windows/Forms/{Internals => }/HighDpiMode.cs | 0 src/System.Windows.Forms/src/Properties/TypeForwards.cs | 1 + 2 files changed, 1 insertion(+) rename src/System.Windows.Forms.Primitives/src/System/Windows/Forms/{Internals => }/HighDpiMode.cs (100%) diff --git a/src/System.Windows.Forms.Primitives/src/System/Windows/Forms/Internals/HighDpiMode.cs b/src/System.Windows.Forms.Primitives/src/System/Windows/Forms/HighDpiMode.cs similarity index 100% rename from src/System.Windows.Forms.Primitives/src/System/Windows/Forms/Internals/HighDpiMode.cs rename to src/System.Windows.Forms.Primitives/src/System/Windows/Forms/HighDpiMode.cs diff --git a/src/System.Windows.Forms/src/Properties/TypeForwards.cs b/src/System.Windows.Forms/src/Properties/TypeForwards.cs index e2fdefc56b9..f2be132b2ed 100644 --- a/src/System.Windows.Forms/src/Properties/TypeForwards.cs +++ b/src/System.Windows.Forms/src/Properties/TypeForwards.cs @@ -8,6 +8,7 @@ [assembly: TypeForwardedTo(typeof(System.Windows.Forms.FileDialogCustomPlace))] [assembly: TypeForwardedTo(typeof(System.Windows.Forms.FileDialogCustomPlacesCollection))] +[assembly: TypeForwardedTo(typeof(System.Windows.Forms.HighDpiMode))] [assembly: TypeForwardedTo(typeof(System.Windows.Forms.Message))] [assembly: TypeForwardedTo(typeof(System.Windows.Forms.Padding))] [assembly: TypeForwardedTo(typeof(System.Windows.Forms.PaddingConverter))]