Clipboard does not copy/paste objects when complied with .Net8 #16350
Replies: 8 comments 6 replies
-
Please don't do GetAwaiter.getresult. I told you before. Instead make OnLoaded async void (this is allowed) and call the function via await |
Beta Was this translation helpful? Give feedback.
-
IIRC BinaryFormatter got deprecated or disabled with net8.0. Do not rely on the old .NET binary serialization when using modern .NET runtimes |
Beta Was this translation helpful? Give feedback.
-
Yes, it's not going to be supported anymore. |
Beta Was this translation helpful? Give feedback.
-
@kekekeks and @maxkatz6 my WPF apps work as expected. This bug appears to be specific to Avalonia. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Please upload a minimum sample using latest nightly builds. Don't use GetAwaiter in the test project. Thanks. |
Beta Was this translation helpful? Give feedback.
-
@timunie please see the following sample application that exposes the bug. |
Beta Was this translation helpful? Give feedback.
-
FYI, dotnet/announcements#293 |
Beta Was this translation helpful? Give feedback.
-
Not a bug, people who don't care about security can re-enable the feature as documented here. Note that the API will be removed from .NET 9 entirely, so fix your apps. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Clipboard does not copy/paste objects when complied with .Net8
To Reproduce
Create a new Avalonia project.
Set the targets to:
<TargetFramework>net7.0</TargetFramework>
Create a model that includes the [Serializable] attribute. For example:
Update the MainView to create the model and copy then paste the model to and from the clipboard like so:
Run the program. Notice the variable "r" is returned as expected.
Modify both Avalonia projects to target:
<TargetFramework>net8.0</TargetFramework>
Run the program. Notice the variable "r" is null.
Expected behavior
The value should be returned.
Avalonia version
11.0.11
OS
Windows
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions