相关文章推荐
面冷心慈的汉堡包  ·  Faulting Module: ...·  5 天前    · 
心软的蟠桃  ·  16.QT-QMap和QHash解析 - ...·  1 年前    · 
高大的手术刀  ·  随记 - 知乎·  1 年前    · 

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:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" Guid="{a0e9b465-b939-57d7-b27d-95d8e925ff57}" />
<EventID>1000</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>100</Task>
<Opcode>0</Opcode>
<Keywords>0x8000000000000000</Keywords>
<TimeCreated SystemTime="2022-05-29T12:00:40.7854474Z" />
<EventRecordID>6885</EventRecordID>
<Correlation />
<Execution ProcessID="19768" ThreadID="24048" />
<Channel>Application</Channel>
<Computer>Lenovo_laptop</Computer>
<Security UserID="S-1-5-21-371826321-386045141-2969802394-1001" />
</System>
<EventData>
<Data Name="AppName">CompInfo.exe</Data>
<Data Name="AppVersion">1.0.0.0</Data>
<Data Name="AppTimeStamp">62571150</Data>
<Data Name="ModuleName">Microsoft.ui.xaml.dll</Data>
<Data Name="ModuleVersion">3.0.0.2204</Data>
<Data Name="ModuleTimeStamp">e15d9c14</Data>
<Data Name="ExceptionCode">c000027b</Data>
<Data Name="FaultingOffset">0023bac9</Data>
<Data Name="ProcessId">0x59d8</Data>
<Data Name="ProcessCreationTime">0x1d87353b61b4db3</Data>
<Data Name="AppPath">C:\Program Files (x86)\CompInfo\CompInfo.exe</Data>
<Data Name="ModulePath">C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.1-preview3_1000.485.2229.0_x86__8wekyb3d8bbwe\Microsoft.ui.xaml.dll</Data>
<Data Name="IntegratorReportId">0f4e4cd6-ed23-4b81-bf6d-7aaade61fcda</Data>
<Data Name="PackageFullName">
</Data>
<Data Name="PackageRelativeAppId">
</Data>
</EventData>
</Event>

It's definite that the destination computer doesn't have some prerequisites.
I have run successfully on another development computer after installing the same WindowsAppSDK. The x64 folder is copied to the destination development computer.
The following picture shows the installed applications. The applications with blue line are satisfied with document prerequisites .

Hello -

I am having much the same problem when trying to run a WinUI 3 desktop app (which runs just fine on Win10 and Win11 hosts) on a Windows Server 2019 host. I get the same exception (0xc000027b) for the same module (Microsoft.ui.xaml.dll). My app is also a non-packaged self-contained desktop app:

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

It was my understanding that self-contained apps had all of the library support they need to run in the target environment, but it seems that's not true if I understand what you're indicating above.

Must I then ensure that some components outside of the app's package are also installed on the target host? I see that there are Windows App Runtime entries in the list, and I thought that the app package contained all such required support. I realize those entries can be on the list from other MS Store apps that are not self-contained.

Thank you very much for any advice you can offer.

Robert Cohn

I know this is older but I just installed all the prerequisites on Windows 11 and I'm getting this same problem. My app will run under VS2022 on the machine but running the .exe directly logs this fault in event viewer. I see the main app window briefly and then it disappears. Running in VS is unstable - sometimes it acts like the .exe - loads the main form and then crashes. It's crashing when I try to get the audio device enumerator - which has little to do with XAML so I'm not sure how to proceed. App works on Win 10. Screenshot of crash in VS attached. 2023-04-18

I am also struggling with this. I'm taking the code directly from the SelfContained unpackaged Win UI Cpp application from the repo: https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/SelfContainedDeployment/cpp/cpp-winui-unpackaged

The sample works when running from Visual Studio 2022 and works when I double click the .exe from the build folder, created by the VS build. However, packaging it into an MSI, installing it and then running results in the above described error. At this stage I'm not trying to deploy it to a different machine so I know that all of the prerequisite installs are present.

I've acheived the above with a console unpackaged app, but it seems that the WinUi stuff is causing issues. This is really frustrating and it seems that there's still no straightforward way deploy a Selfcontained, Win Ui, unpackaged app. As mentioned, I'm using code taken directly from the samples... I'd really appreciate some help on this.