diff --git a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
index f575de14b..01d13b80d 100644
--- a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
+++ b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
@@ -1970,7 +1970,21 @@ namespace Terminal.Gui {
class WindowsClipboard : ClipboardBase {
public WindowsClipboard ()
{
- IsSupported = IsClipboardFormatAvailable (cfUnicodeText);
+ IsSupported = CheckClipboardIsAvailable ();
+ }
+
+ private static bool CheckClipboardIsAvailable ()
+ {
+ // Attempt to open the clipboard
+ if (OpenClipboard (IntPtr.Zero)) {
+ // Clipboard is available
+ // Close the clipboard after use
+ CloseClipboard ();
+
+ return true;
+ }
+ // Clipboard is not available
+ return false;
}
public override bool IsSupported { get; }
diff --git a/UICatalog/UICatalog.csproj b/UICatalog/UICatalog.csproj
index 89dcd4c0c..a05ebdf02 100644
--- a/UICatalog/UICatalog.csproj
+++ b/UICatalog/UICatalog.csproj
@@ -21,7 +21,7 @@
-
+
diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj
index d7e5c2d2a..63f2ba107 100644
--- a/UnitTests/UnitTests.csproj
+++ b/UnitTests/UnitTests.csproj
@@ -19,10 +19,10 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive