Closed John-Qiao closed 1 year ago
@lonitra @JeremyKuhne please investigate.
@John-Qiao is this on windows-x64?
@lonitra @JeremyKuhne I think the struct is missing [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
from the old pinvoke definition.
https://github.com/dotnet/winforms/blob/62edc1ab7b601bee58199fdea2580a54cf5cd25b/src/System.Windows.Forms.Primitives/src/Windows/Win32/UI/Controls/Dialogs/OPENFILENAME.cs#L7-L8
That shouldn't matter as those are the defaults. I'm about to take a look.
Uh, never mind. ANSI is the default.
@elachlan yes, it is on windows-x64.
Verified with .NET SDK 8.0.100-alpha.1.22526.1 build from main branch, this issue is fixed that the save file dialog can be opened successfully now.
.NET version
8.0.100-alpha.1.22514.14 + PR: 7933 private dlls
Did it work in .NET Framework?
No
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes, this is a regression issue, it occurs in latest main branch 8.0 sdk + PR: 7933 private dlls.
Issue description
The save file dialog cannot be opened successfully.
.NET 8.0 + PR: 7933 private dlls.
Details log:
.NET 8.0
Steps to reproduce