as short introduction, I’m quite new to .net development. Even though i had worked with it in the past briefly, it was only a couple of months ago i picked up .net development more seriously, thanks to a personal project I have.
My latest work for the past 2 weeks was to implement a custom installer app based on WinUI 3 and .NET 8. To put it simply, its just a nice interface to extract an archive that’s embedded inside, plus a small Registry Integration so that a clean uninstall is supported from the Windows’ Apps Settings page.
The reason I’m writing this post is to find some help for my issue that crashes my app. The app is being published as a single file self-contained app, because being an installer, distributing it as a single .exe is mandatory. Luckily they enabled single file publishing not too long ago for winui 3 apps.
After several issues with the app working from visual studio (either debug or release config) but crashing when published to single .exe, i managed to fix it by playing with the settings in my csproj and publish profile files.
All nice and dandy, tried to add one more feature, and now……. no new dependencies for that feature, minimum code changes (none in csproj or publish profile), yet my app is now crashing again when i publish as a single .exe.
All i know is that its crashing due to something related to kernelbase.dll (which didnt happen before yet) according to the Event Viewer tool:
Faulting application name: NOTWORKING-InstallerWinUI.exe, version: 1.0.0.0, time stamp: 0x65a89639
Faulting module name: KERNELBASE.dll, version: 10.0.22621.2841, time stamp: 0x3091b6fb
Exception code: 0x00000004
Fault offset: 0x000000000006567c
Faulting process ID: 0x0x4954
Faulting application start time: 0x0x1DA99FA7F15571C.
I’m starting to lose my shit guys, its been 1 extra week of what should have been 1 week in total for the development of this app. And almost all this entire week was not spent on features but on debugging stupid MS complicated build system and trying to find documentation about that shitload of props a .csproj file can have.(which is garbage, Microsoft)
Can anyone please point me in the right direction on how to solve it?
PS: i even rolled back to that commit just to publish again and get the publish logs. surprise, they are almost identical with the logs of the latest code publish…only ~5 lines extra in the newer log and all just small warnings