Skip to content

Clipboard behaves different between net8 and net9 #12665

@InlineAsm

Description

@InlineAsm

.NET version

net9.0-windows

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

It does work on net8.0

Issue description

The Clipboard method ContainsText returns false when a string is placed on the clipboard using SetDataObject. In previous versions of the runtime this method would return true.

Steps to reproduce

The following code returns true on net8.0 and returns false on net9.0

Clipboard.SetDataObject("TEXT");
var containsText = Clipboard.ContainsText();

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions