I've made a small WPF application in .NET Core 3.0 which is giving me this strange behaviour when trying to debug.
The command that's giving me trouble is defined like:
public ICommand DoWorkCommand { get; private set; }
In the constructor:
DoWorkCommand = new CommandHandler(async () => await DoWorkAsync());
DoWorkAsync:
private async Task DoWorkAsync()
{
var logic = new Logic();
await logic.DoWorkAsync()
}
But whatever exception is thrown in the logic class, it's shown in the anonymous method in the initialization of the command.
Is there any way to fix this?