Share via

WinUI3 App crashing at launch

gopi parimi 0 Reputation points
2026-02-03T06:08:27.2+00:00

WinUI3 App crashing at launch (certification) but works fine in development machine, how to resolve this issue.

Windows development | WinUI

2 answers

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 16,595 Reputation points Microsoft External Staff Moderator
    2026-02-04T04:07:12.3266667+00:00

    Hi @gopi parimi ,

    Thanks for reaching out.

    The key detail in the crash log is that the failure happens inside Microsoft.UI.Xaml.dll from the Windows App Runtime, and it happens right at app startup.

    On your development machine, Visual Studio installs extra WinUI/Windows App Runtime components and keeps things very forgiving. During Store certification (and for real users), the app runs on a clean, locked-down environment where only the dependencies you explicitly declare are available. If anything is missing or used too early, the app can crash before a window is even created.

    A few things that typically resolve this:

    • Installing the MSIX on a machine without Visual Studio (or using a clean VM) usually reproduces the certification crash and makes the root cause much easier to spot.
    • Make sure the app is packaged against a supported and stable Windows App Runtime version, and that it’s correctly referenced in the MSIX. Avoid relying on whatever happens to be installed by Visual Studio.
    • Avoid doing heavy work or accessing OS features in App.xaml.cs or early window initialization. Things like file system access, registry access, or APIs that behave differently in packaged apps can cause WinUI to fail before rendering.
    • Some APIs work fine during local debugging but are restricted or behave differently in Store-packaged apps. If the app touches anything outside its app container at startup, it can crash immediately.

    Crashes like this are related to a missing runtime dependency or startup logic that behaves differently outside the development environment. Reviewing the Windows App Runtime version being used and minimizing work done during early app startup often helps narrow down and resolve this type of issue.

    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.


  2. Q&A Assist
    2026-02-03T06:08:35.0233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    If your WinUI3 app is crashing at launch during certification but works fine on your development machine, there are several steps you can take to troubleshoot and resolve the issue:

    1. Check System Requirements: Ensure that the test environment meets all the prerequisites for launching the app, such as User Account Control (UAC) being enabled and the screen resolution being at least 1024 x 768.
    2. Review Activation Event Logs: If the app fails to launch, you can review the activation event log for any errors. Open eventvwr.exe, navigate to Application and Services Log\Microsoft\Windows\Immersive-Shell, and filter the view to show Event IDs 5900-6000 to find relevant log entries.
    3. Test on Different Configurations: Make sure to test your app on various configurations to identify any stability issues that may not appear on your development machine.
    4. Check for Dependencies: Ensure that all necessary dependencies are available in the test environment. Sometimes, missing libraries or resources can cause crashes.
    5. Review Common Certification Failures: Familiarize yourself with common certification failures and ensure your app does not crash without network connectivity, and that it provides all necessary information for users.
    6. Use the Windows App Certification Kit: Utilize the Windows App Certification Kit to identify any issues before publication. This tool can help catch problems that might lead to crashes during certification.

    By following these steps, you should be able to diagnose and fix the crashing issue with your WinUI3 app during certification.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.