Cannot show dialog in WPF .net Core

1

Following code

OpenFileDialog openFileDialog = new OpenFileDialog();
if (openFileDialog.ShowDialog() == true)
{ 
            
}

works fine in a WPF project on .NET Framework but i cannot show a dialog in .NET Core. The dialog flickers open for a split second then the program exits with: has exited with code -2146232797 (0x80131623).

This happens on any WPF .NET Core project but works fine in any .NET Framework project.

c#
.net
wpf
.net-core
asked on Stack Overflow Sep 4, 2020 by Harry • edited Sep 4, 2020 by Hostel

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0