DataObject contains wrong data for file drop under .Net 9 RC1 #12190
Labels
💥 regression-preview
Regression from a preview release
untriaged
The team needs to look at this issue in the next triage
Milestone
.NET version
.Net 9 RC1
Did it work in .NET Framework?
Yes
Did it work in any of the earlier releases of .NET Core or .NET 5+?
it worked correctly in .Net 8, here is what I expect to see:
Issue description
at file drop action DataObject.GetDataPresent method returns wrong value, so, we can't rely on it any more. Here is what I see in debugger:
You see, it shows single data format Shell IdList Array, but at the same time GetDataPresent return true for any existent or not existent formats I ask
Steps to reproduce
Create Windows Forms application, set Form AllowDrop property to true and add handler for Form.DragOver event, something like this:
You can check for any types which are present in your application instead of Appointment type in this snippet.
Run application, select any file in FileExplorer and drag it over the form. You can set breakpoint in debugger and play with VS Watch window to explore DataObject content. Under .Net 9 you can't see any more that it was a file and you get all wrong information about presented Data.
The text was updated successfully, but these errors were encountered: