OpenFileDialog.ShowDialog() hangs in MainForm with:
[STAThread]
static async Task<int> Main(string[] args)
{
var rootCommand = new RootCommand();
rootCommand.SetHandler((context) =>
{
Application.Run(new MainForm());
});
return await rootCommand.InvokeAsync(args);
}
but works well with:
[STAThread]
static int Main(string[] args)
{
var rootCommand = new RootCommand();
rootCommand.SetHandler((context) =>
{
Application.Run(new MainForm());
});
return rootCommand.Invoke(args);
}
OpenFileDialog.ShowDialog()hangs in MainForm with:but works well with: