© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
10 replies
Peggun

WinUI 3 App.g.i.cs Autogen File breaking?

I am trying to create a WinUI 3 Application and I added some code and now the autogenerated file App.g.i.cs throws a break. Here is the code that breaks it, and e, doesnt have a stack trace

App.g.i.cs
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
            UnhandledException += (sender, e) =>
            {
                if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
            };
#endif
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
            UnhandledException += (sender, e) =>
            {
                if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
            };
#endif


I have a feeling its something to do with InitializeComponent but im not sure.

Here are the errors
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

WinUI App
C#CC# / help
2y ago
Winui 3 titlebar problems
C#CC# / help
3y ago
WinUI 3 Blank white background when running app
C#CC# / help
3y ago
❔ Unpackaged WinUI 3 app raises 0xc000027b after publish
C#CC# / help
3y ago