From ad4a5cdfe71490cb4767ec4e7fdf84650805ed92 Mon Sep 17 00:00:00 2001 From: "Shawn Yuan (from Dev Box)" Date: Wed, 11 Feb 2026 14:54:03 +0800 Subject: [PATCH] fix compiling issue --- src/common/UITestAutomation/ScreenRecording.cs | 2 +- src/common/UITestAutomation/UITestAutomation.csproj | 3 +++ .../ext/SamplePagesExtension/SamplePagesExtension.csproj | 9 +++++---- .../MonacoPreviewHandler/MonacoPreviewHandler.csproj | 7 +++++++ .../SvgPreviewHandler/SvgPreviewHandler.csproj | 7 +++++++ .../Preview.SvgPreviewHandler.UnitTests.csproj | 6 ++++++ 6 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/common/UITestAutomation/ScreenRecording.cs b/src/common/UITestAutomation/ScreenRecording.cs index 57e844936d..efd7a2b62d 100644 --- a/src/common/UITestAutomation/ScreenRecording.cs +++ b/src/common/UITestAutomation/ScreenRecording.cs @@ -216,7 +216,7 @@ namespace Microsoft.PowerToys.UITest Rectangle bounds = new Rectangle(0, 0, screenWidth, screenHeight); using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height, PixelFormat.Format24bppRgb)) { - using (Graphics g = Graphics.FromImage(bitmap)) + using (System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmap)) { g.CopyFromScreen(bounds.Location, Point.Empty, bounds.Size); diff --git a/src/common/UITestAutomation/UITestAutomation.csproj b/src/common/UITestAutomation/UITestAutomation.csproj index b4e8831a98..2da1ee398e 100644 --- a/src/common/UITestAutomation/UITestAutomation.csproj +++ b/src/common/UITestAutomation/UITestAutomation.csproj @@ -12,6 +12,8 @@ net9.0-windows10.0.26100.0 true false + + $(NoWarn);CA1305;CA1310;CA2101 @@ -20,6 +22,7 @@ + diff --git a/src/modules/cmdpal/ext/SamplePagesExtension/SamplePagesExtension.csproj b/src/modules/cmdpal/ext/SamplePagesExtension/SamplePagesExtension.csproj index b9a8acc29d..f0fd46bea2 100644 --- a/src/modules/cmdpal/ext/SamplePagesExtension/SamplePagesExtension.csproj +++ b/src/modules/cmdpal/ext/SamplePagesExtension/SamplePagesExtension.csproj @@ -62,11 +62,12 @@ true - + + - true - true - true + false + false + false diff --git a/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandler.csproj b/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandler.csproj index adc89ae1f6..84002ab103 100644 --- a/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandler.csproj +++ b/src/modules/previewpane/MonacoPreviewHandler/MonacoPreviewHandler.csproj @@ -3,6 +3,13 @@ + + + + false + false + + enable true diff --git a/src/modules/previewpane/SvgPreviewHandler/SvgPreviewHandler.csproj b/src/modules/previewpane/SvgPreviewHandler/SvgPreviewHandler.csproj index 40ff418d99..7a4ff68bd3 100644 --- a/src/modules/previewpane/SvgPreviewHandler/SvgPreviewHandler.csproj +++ b/src/modules/previewpane/SvgPreviewHandler/SvgPreviewHandler.csproj @@ -3,6 +3,13 @@ + + + + false + false + + enable true diff --git a/src/modules/previewpane/UnitTests-SvgPreviewHandler/Preview.SvgPreviewHandler.UnitTests.csproj b/src/modules/previewpane/UnitTests-SvgPreviewHandler/Preview.SvgPreviewHandler.UnitTests.csproj index ba5997925f..64d0150b9d 100644 --- a/src/modules/previewpane/UnitTests-SvgPreviewHandler/Preview.SvgPreviewHandler.UnitTests.csproj +++ b/src/modules/previewpane/UnitTests-SvgPreviewHandler/Preview.SvgPreviewHandler.UnitTests.csproj @@ -2,6 +2,12 @@ + + + false + false + + UnitTests-SvgPreviewHandler PowerToys UnitTests-SvgPreviewHandler