I used the answer in this question and I got an issue with it.
It return exception: {"The system cannot find the file specified."}
After a bit of investigation. It turns out that if your WPF application is CORE, you need to change UseShellExecute
to true
.
This is mentioned in Microsoft docs:
true if the shell should be used when starting the process; false if the process should be created directly from the executable file. The default is true on .NET Framework apps and false on .NET Core apps.
So to make this work you need to added UseShellExecute
and set it to true
:
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri){ UseShellExecute = true });