Skip to content

Faulting Module : Microsoft.UI.Xaml.DLL - Win32 WinUI 3 App not loading #7163

Closed

Description

Describe the bug

When I'm trying to run my WinUI 3 app, I get this error in Event Viewer:

Log Name: Application
Source: Application Error
Date: 29-05-2022 17:30:40
Event ID: 1000
Task Category: Application Crashing Events
Level: Error
Keywords:
User:
Computer:
Description:
Faulting application name: CompInfo.exe, version: 1.0.0.0, time stamp: 0x62571150
Faulting module name: Microsoft.ui.xaml.dll, version: 3.0.0.2204, time stamp: 0xe15d9c14
Exception code: 0xc000027b
Fault offset: 0x0023bac9
Faulting process id: 0x0x59D8
Faulting application start time: 0x0x1D87353B61B4DB3
Faulting application path: C:\Program Files (x86)\CompInfo\CompInfo.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.1-preview3_1000.485.2229.0_x86_8wekyb3d8bbwe\Microsoft.ui.xaml.dll
Report Id: 0f4e4cd6-ed23-4b81-bf6d-7aaade61fcda
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
](http://schemas.microsoft.com/win/2004/08/events/event);


1000
0
2
100
0
0x8000000000000000

6885


Application
Lenovo_laptop



CompInfo.exe
1.0.0.0
62571150
Microsoft.ui.xaml.dll
3.0.0.2204
e15d9c14
c000027b
0023bac9
0x59d8
0x1d87353b61b4db3
C:\Program Files (x86)\CompInfo\CompInfo.exe
C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.1-preview3_1000.485.2229.0_x86_8wekyb3d8bbwe\Microsoft.ui.xaml.dll
0f4e4cd6-ed23-4b81-bf6d-7aaade61fcda





Steps to reproduce the bug

  1. Create a WinUI 3 app with Windows App SDK Runtime 1.0.3
  2. Build it as Non-Packaged
  3. Use Inno Setup to create a setup.exe
  4. Run it on a computer which has Windows App SDK Runtime 1.0.3 installed
  5. App doesn't open
  6. Open Event Viewer and find issue under Windows Logs> Application

Expected behavior

App runs smoothly

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.0.3

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

Windows Insider Build (xxxxx)

Additional context

No response

Activity

  1. ghost added
    needs-triage
    on May 29, 2022
  2. added
    team-Markup
    product-winui3
    and removed
    needs-triage
    on Jun 7, 2022
  3. marb2000 commented on Jun 20, 2022

    @marb2000
    Contributor

    Did you install the Windows App SDK runtime on your machine? When your app is unpackaged you need it:

    https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/deploy-unpackaged-apps#deploy-windows-app-sdk-runtime

  4. lukedukeus commented on Jul 14, 2022

    @lukedukeus

    Im experiencing this too, OceanCyan Tech (@OceanCyanTech) did you ever get it working?

    Faulting module name: Microsoft.ui.xaml.dll, version: 3.0.0.2206, time stamp: 0xfec042e2
    Exception code: 0xc000027b
    Fault offset: 0x000000000033f2d8
    
  5. dannyr-git commented on Mar 13, 2023

    @dannyr-git

    I am having this same problem. My unpackaged app only runs on my machine. I've tested it with friends' Windows 10 machines and my wife's Windows 11 machine. All errors look like this :

    Faulting application name: wingman.exe, version: 1.0.0.0, time stamp: 0x63c9df9f
    Faulting module name: Microsoft.ui.xaml.dll, version: 3.0.0.2302, time stamp: 0x93c3ada5
    Exception code: 0xc000027b
    Fault offset: 0x00000000007cd8bc
    Faulting process id: 0x0x38C
    Faulting application start time: 0x0x1D955C8A6F93000
    Faulting application path: d:\Store\net7.0-windows10.0.19041.0\wingman.exe
    Faulting module path: d:\Store\net7.0-windows10.0.19041.0\Microsoft.ui.xaml.dll
    Report Id: a9acd5cd-c47b-4fbc-a63c-5b51f02d421e
    Faulting package full name: 
    Faulting package-relative application ID: 
    

    I am compiling with this :

        <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
        <WindowsPackageType>None</WindowsPackageType>
    

    I've personally overseen that every machine installs :

    .Net7 (obviously)
    VCRedist
    and 
    https://aka.ms/windowsappsdk/1.2/1.2.230217.4/windowsappruntimeinstall-x64.exe
    https://aka.ms/windowsappsdk/1.2/1.2.230217.4/windowsappruntimeinstall-x86.exe
    
    

    I have no idea how to triage what is going on here. I did notice when you install the WindowsAppRuntime, you get a Microsoft.UI.Xaml.DLL that shows :
    v2.8.2207.29001 , that is 6MB

    But when I compile with true, the same dll in the folder is
    v3.0.0.2302 (3.0.0-zmain.2302) and is 14.1MB

    The full source of the app is here for reference :

    https://github.com/dannyr-git/wingman

  6. bogdan-patraucean commented on Jul 5, 2023

    @bogdan-patraucean

    This issue is happening for a packaged app installed from the Store as well. With all runtimes installed.

    Might be related to this #8577, #8446 and #5746

    It's caused by this error, as I got to find using windbg

    0x80040154 (FACILITY_ITF - COM/OLE Interface Management): Class not registered
    
    	Stack	 : 0x2342e4e6ee0
    		7ff93d21fa0a Microsoft_ui_xaml!DirectUI::FrameworkApplication::StartDesktop+0x1c3886
    		7ff93d07abde Microsoft_ui_xaml!DirectUI::FrameworkApplicationFactory::Start+0x6e
    		7ff6e3566fad
    

    Also, Microsoft states this as a know issue:

    Potential run-time error in an app with Single-project MSIX that consumes types defined in a referenced Windows Runtime Component:
    To resolve, manually add activatable class entries to the appxmanifest.xml.
    The expected error in C# applications is “COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).
    The expected error in C++/WinRT applications is “winrt::hresult_class_not_registered”.

    Miguel Ramos (@marb2000) , any updates on this? it's been 2 years since this framework launched and this issue is affecting a lot of users that try to use apps developed with WinUI 3.

  7. e0ff commented on Oct 27, 2023

    @e0ff

    I have a user who has experienced this error multiple times. Our app is packaged.

  8. CodeFontana commented on Feb 25, 2024

    @CodeFontana

    I'm new to WinUI3, just trying to get off the ground. I have prior WPF experience, so it's not like I'm totally lost.

    I'm attempting to build a traditional desktop application, having nothing to do with the Windows Store. I've eliminated the launch profile for the 'packaged' version of the app, along with the 'Assets' folder, and the Package.appxmanifest, which appeared related only to the Packaged/Store version.

    Additionally, I've added these three setting to my .csproj file:

    <EnableMsixTooling>false</EnableMsixTooling>
    <WindowsPackageType>None</WindowsPackageType>
    <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
    

    Running in Visual Studio 2022 works without an issue.
    Publishing to a folder has landed me on this thread with a crash:

    Faulting application name: WinUIDesktop.exe, version: 1.0.0.0, time stamp: 0x65ab0000
    Faulting module name: Microsoft.ui.xaml.dll, version: 3.1.4.0, time stamp: 0x343afd70
    Exception code: 0xc000027b
    Fault offset: 0x00000000003b9584
    Faulting process id: 0x0x2514
    

    Seems if I switch EnableMsixTooling back to 'true', everything works.

    I didn't want to look into MAUI, as I don't need cross-platform.
    Was looking into WinUI 3 due to the component gallery, would save me a lot of time vs plain old WPF.

    With leaving EnableMsixTooling set to true, I'm continuing, but this already feels 'fragile' out of the box. I would highly recommend a project template for starting an 'Unpackaged' application, in addition to it not crashing with the published version. You might also consider rebranding 'unpackaged' as 'Traditional Desktop' and maybe 'Packaged' as 'Windows Store', if that's appropriate.

  9. CodeFontana commented on Feb 25, 2024

    @CodeFontana

    Coincidentally, 20 mins later, while browsing the WinUI 3 Gallery app, it also crashed on the same Microsoft.ui.xaml.dll:

    Faulting application name: WinUIGallery.exe, version: 2.2.0.0, time stamp: 0x655e0000
    Faulting module name: Microsoft.ui.xaml.dll, version: 3.1.4.0, time stamp: 0xd8e270fd
    Exception code: 0xc000027b
    Fault offset: 0x00000000003ba2f4
    

    I was searching icons at the time.

  10. karmeye commented on Feb 28, 2024

    @karmeye

    Seems if I switch EnableMsixTooling back to 'true', everything works.

    Thanks Brian Fontana (@CodeFontana)! I also got this in the event log after publishing the non package project generated by the "Blank App, Packaged with Windows Application Packaging Project" template.

    This is supposed to work without that right?

  11. CodeFontana commented on Feb 28, 2024

    @CodeFontana

    Seems if I switch EnableMsixTooling back to 'true', everything works.

    Thanks Brian Fontana (@CodeFontana)! I also got this in the event log after publishing the non package project generated by the "Blank App, Packaged with Windows Application Packaging Project" template.

    This is supposed to work without that right?

    I'm in the same boat-- I would believe you should be able to create a WinUI 3 app independently from MSIX and the Windows Store, but I can't say this for sure, as I'm new to this project type myself.

    Seems WinUI project templates and settings need an overhaul. Disappointing it's so confusing/buggy out of the box!

  12. sigmarsson commented on Mar 15, 2024

    @sigmarsson

    Installed :

    image
      <PropertyGroup>
        <OutputType>WinExe</OutputType>
        <TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
        <TargetPlatformMinVersion>10.0.22621.0</TargetPlatformMinVersion>
        <RootNamespace>Weather.History</RootNamespace>
        <Platforms>x86;x64;</Platforms>
        <RuntimeIdentifiers>win-x86;win-x64;</RuntimeIdentifiers>
        <DefaultLanguage>en</DefaultLanguage>
        <UseWinUI>true</UseWinUI>
        <EnableMsixTooling>true</EnableMsixTooling>
        <WindowsPackageType>MSIX</WindowsPackageType>
        <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
      </PropertyGroup>
    

    Deploy successfull and program icon appears in Windows start menu.

    image

    what is missing if self-contained is being demanded ? I wonder if WinUI will represent a workload in Visual Studio installer like MAUI does.

  13. 8 remaining items

  14. added
    Crash
    on Sep 5, 2024
  15. SanskaarPatni commented on Sep 19, 2024

    @SanskaarPatni

    I am facing the same issue. I created a blank app, packaged (winui 3 in Desktop)
    image

    The "Debug" configuration deploys fine, and app does not crash on launching.

    Whereas the "Release" configuration deploys and the app crashes when launched from Start menu.

    image

    Is there any issue with the template?

  16. jansapp commented on Sep 23, 2024

    @jansapp

    same here
    Unbenannt

  17. pratikone commented on Sep 25, 2024

    @pratikone
    Contributor

    Thank you all for sharing your experiences with these failures. Your input is incredibly valuable in identifying and resolving these issues. After investigating multiple issues discussed in this thread, I’ve compiled a list of potential causes and solutions for the mux.dll crash failures. It addresses some of concerns. We need more data for better root cause analysis of crashes.

    Investigation Results

    1. Publishing Self-Contained Unpackaged App to a Folder Results in a Crash
      Issue: The “Trim unused code” option is enabled by default in publish settings, leading to certain WinRT parts being incorrectly trimmed out. This causes a crash when running the build.
      Solution: A fix is underway. More details can be found here. In the meantime, you can disable the “Trim unused code” option to prevent the crash.

    2. EnableMSIXTooling=false Results in a Crash in Self-Contained Unpackaged App’s Launch
      Issue: The EnableMsixTooling property must be set to true even for self-contained unpackaged apps, as it includes essential resource loading logic.
      Solution: We are working on improving the default settings and providing clearer indications of required build properties.

    3. Publishing Packaged App to a Folder Results and launching the published binary results in a Crash
      Issue: Publishing a packaged app to a folder is not a valid configuration. This option is only applicable to unpackaged apps and can cause crashes.
      Solution: Use Project -> Publish -> Create App Packages to create an MSIX package for packaged apps. We are working on disabling the folder publish option for packaged apps.

    4. Published Self-Contained MSIX Installs Correctly but Crashes on Launch on Different Machines
      Issue: This issue is challenging to reproduce. The crash stack is not helpful without symbols, and the likely cause is missing runtimes on the target machines.
      Solution: Ensure all necessary dependencies (e.g., Universal CRT, .NET runtime) are installed.

    Debugging Crashes

    With WinUI 3 being source available and symbols available, you can get meaningful stack traces from crashes.
    First ensure you have the right setup for debugging.

    WinDBG: Add the Microsoft symbol server to the default symbol path. Launch the app and let it crash to fetch symbols and display a meaningful stack trace.
    Symbol Path Setup
    Visual Studio: Add the Microsoft symbol server in Options -> Debugging -> Symbols. Launch the app from Visual Studio, ensuring the debugging mode is set to Native, Mixed, or Auto.
    Mixed Mode Debugging
    Once you have a detailed stack trace, please create a new issue in the microsoft-ui-xaml repo and share your configuration and stack trace. This will help us address these problems more efficiently.

    Few debugging techniques :

    1. Investigating contents of stowed exception. This resource can be useful. https://learn.microsoft.com/en-us/shows/inside/c000027b.Windbg provides a useful !pde.dse command.

    2. Set breakpoint on Microsoft.UI.Xaml!OnFailureEncountered.

    3. Subscribing to Application.UnhandledException Event https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.application.unhandledexception?view=windows-app-sdk-1.6

    4. See crash debugging hands-on by Scott Jones (@Scottj1s) here : https://www.youtube.com/watch?v=uFgGhNGlPm4&t=1015s

    If you encounter a new failure, please create a new thread instead of adding to this one. This will help us track and communicate more effectively. I will be closing this issue now.

    Thank you for your cooperation and understanding!

    Michael Hawker (@michael-hawker) for reference.

  18. CodeFontana commented on Sep 26, 2024

    @CodeFontana

    By closing this issue, I'm assuming you're saying WinUI is not a viable project type for traditional desktop needs. To be honest, my team abandoned the idea of using WinUI3 for our needs, based on the idea it was broken out of the box. This is feedback you need to hear when arbitrarily closing an issue based on a summary, and no concrete solutions. I'd rather you retire the technology than lie to us.

  19. added
    needs-triage
    on Sep 26, 2024
  20. freemstr commented on Sep 26, 2024

    @freemstr

    I can repro this issue in .NET 8 MAUI project as well with publish trimmed turned off, just FYI

  21. Scottj1s commented on Sep 26, 2024

    @Scottj1s
    Member

    Brian Fontana (@CodeFontana) our intent is not to ignore anyone, but to actively manage our backlog. This issue dates back a couple years to Windows App SDK 1.0.3, and many variations of crashes in Microsoft.UI.Xaml.DLL have been added to it. We've resolved a few of these, and are tracking others separately. We welcome new issues opened against the latest version of Windows App SDK, with clear repro steps.

  22. Scottj1s commented on Sep 26, 2024

    @Scottj1s
    Member

    freemstr please enter a new issue for your MAUI-related crash.

  23. CodeFontana commented on Sep 27, 2024

    @CodeFontana

    Brian Fontana (@CodeFontana) our intent is not to ignore anyone, but to actively manage our backlog. This issue dates back a couple years to Windows App SDK 1.0.3, and many variations of crashes in Microsoft.UI.Xaml.DLL have been added to it. We've resolved a few of these, and are tracking others separately. We welcome new issues opened against the latest version of Windows App SDK, with clear repro steps.

    Yeah, you're right. It's just frustrating because it takes so long to address what I would call "getting started" issues. Unfortunately, my team is not using this technology, and now it would be an uphill battle to try and suggest again. There's a basic expectation this stuff should work gracefully out of the box-- I mean we really didn't have to go far to immediately bump into problems. And I still feel there should be more obvious templating for "Traditional Desktop" vs "Windows Store" applications. Sorry if my feedback was bit rough, might just be passion and disappointment. We want you guys to hit every mark, so us folks in the trenches can confidently and consistently recommend cohesive Microsoft tech stacks.

  24. mirec75 commented on Dec 15, 2024

    @mirec75

    The problem with Microsoft.UI.Xaml.dll is not limited just to developing a new app.
    See my problem after I updated my Win11 office notebook to 24H2 with an always crashing file explorer.
    and see the solution here:
    https://answers.microsoft.com/en-us/windows/forum/windows_11-wintop_update/cannot-open-explorer-after-update-to-24h2-crashes/e149b7b0-2d67-445c-807b-e25d6b87d656

    With "office notebook" I mean, I'm not developing anything on the notebook, just use it with MS Office, for office like stuff
    and the file explorer was simply crashing each time when I wanted to open it.

  25. fullstackdevsalmoh commented on Sep 2, 2025

    @fullstackdevsalmoh

    same here, ,, test small MAUI app works fine, but real app not working,, very disappointed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Crashbugneeds-triageproduct-winui3team-Markup

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions