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
I have a feeling its something to do with InitializeComponent but im not sure.
Here are the errors
5 Replies
well in the code you added do you have any warnings or so?
i would asume something xamlrelated
well this is my mainwindow.xaml and mainwindow.xaml.cs
for now its just the default. some times when i create the project again with complete defaults it does the same thing. its like its random
I also get this error after stopping the Debug session in the Debug Console which could be related?
Exception thrown: 'System.Runtime.InteropServices.COMException' in WinRT.Runtime.dll
WinRT information: The application called an interface that was marshalled for a different thread.
but doesnt show for e as a stack trace
i have no warnings or errors in either code
$vsdrunk
* close VS
* remove the hidden folder
.vs
* remove all bin
and obj
folder next to each csproj (DO NOT TOUCH THE .git
FOLDER OR WHAT'S INSIDE)
* restart vsthat still didnt work.
this is the stack frame for it
UTD.WindowsGUI.dll!UTD.WindowsGUI.App.InitializeComponent.AnonymousMethod__4_2(object sender, Microsoft.UI.Xaml.UnhandledExceptionEventArgs e) Line 69 C#and i added a textblock to the stack panel too dont worry about this anymore, turns out Microsoft.UI.Xaml NuGet package was causing all of the issues