From a2cda23c756996785aadd5cbfcfbd9e50224e00c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Wed, 3 Dec 2025 12:43:23 -0800 Subject: [PATCH 1/2] Add missing parameter to UpdateApplication method Fixes https://github.com/dotnet/sdk/issues/51480 --- .../Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Windows.Forms/System/Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs b/src/System.Windows.Forms/System/Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs index 2113554de93..f56429ee705 100644 --- a/src/System.Windows.Forms/System/Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs +++ b/src/System.Windows.Forms/System/Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs @@ -12,7 +12,7 @@ namespace System.Windows.Forms; internal static class WinFormsMetadataUpdateHandler { /// Invoked after a metadata update is applied. - internal static void UpdateApplication() + internal static void UpdateApplication(Type[]? updatedTypes) { // Repaint all open forms. foreach (Form openForm in Application.OpenForms) From 50c2e811121880f8687f50f9f22865743d265d4f Mon Sep 17 00:00:00 2001 From: Tomas Matousek Date: Wed, 3 Dec 2025 17:27:07 -0800 Subject: [PATCH 2/2] Suppress warning --- .../Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/System.Windows.Forms/System/Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs b/src/System.Windows.Forms/System/Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs index f56429ee705..d9d358033af 100644 --- a/src/System.Windows.Forms/System/Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs +++ b/src/System.Windows.Forms/System/Windows/Forms/Internal/WinFormsMetadataUpdateHandler.cs @@ -4,6 +4,8 @@ using System.Reflection.Metadata; using System.Windows.Forms; +#pragma warning disable IDE0060 // Remove unused parameter + [assembly: MetadataUpdateHandler(typeof(WinFormsMetadataUpdateHandler))] namespace System.Windows.Forms;