UnhandledException not fire in publish(realsed) mode as exe

Dani_S 2,726 Reputation points
2024-03-25T07:58:43.6333333+00:00

Hi,

Can you please check with sample code in the end of in this link:

https://github.com/dotnet/maui/issues/21007

why UnhandledException not work in reeased mode after publish.

public partial class App : Application {

public App() {

InitializeComponent();

AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

}

private async void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {

try { } catch (Exception) { } }

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,869 questions
{count} votes