Hi,
From the information you’ve provided, this looks less like a random crash and more like a compatibility / packaging issue between your WinUI 3 app (Windows App SDK) and the Windows 10 device you’re running it on.
The KERNELBASE.dll crash with exception code 0xc000027b is a generic native failure that often appears when something goes wrong very early in the app’s startup, for example due to unsupported OS version or APIs.
Below are some checks and suggestions you can try.
1. Verify Windows App SDK version vs. Windows 10 build
- In your WinUI 3 project, open the
.csproj file and locate the Windows App SDK package reference, for example:
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240627000" />
- Check the documentation / release notes for that Windows App SDK version to confirm the minimum supported Windows 10 build.
- On the Windows 10 laptop:
- Press
Win + R, type winver, and check the exact Windows 10 version and build number.
- Make sure this build is supported by the Windows App SDK version you are using.
If the laptop is running an older Windows 10 build than required by your Windows App SDK version, the app may install successfully from the Store but fail at runtime.
If this is the case:
- Either update the Windows 10 machine to a supported build, or
- Use an earlier Windows App SDK version that supports your target Windows 10 build, rebuild and republish the app.
2. Check Package.appxmanifest target device family settings
Even for a packaged WinUI 3 desktop app, the manifest defines the supported OS versions.
- Open the
Package.appxmanifest file (usually in the packaging project).
- Find the
TargetDeviceFamily element, for example:
<TargetDeviceFamily Name="Windows.Universal"
MinVersion="10.0.17763.0"
MaxVersionTested="10.0.22621.0" />
- Confirm that:
-
MinVersion is less than or equal to the Windows 10 build number on your laptop.
-
MaxVersionTested can be higher (e.g., a Windows 11 build), but MinVersion must not exceed the version of the target machine.
If MinVersion is set higher than the Windows 10 build where you’re installing the app, it can lead to unexpected runtime failures.
3. Capture the managed exception details from Event Viewer
The log you posted is the native Application Error event. For .NET / WinUI applications, there is usually a corresponding .NET Runtime event that contains more useful information.
On the Windows 10 laptop:
- Open Event Viewer.
- Navigate to Windows Logs → Application.
- Look for:
- Entries with Source =
.NET Runtime, close in time to the crash you reported.
- Open that event and check for:
- Exception type (for example,
System.TypeLoadException, System.DllNotFoundException, etc.),
- Exception message,
- Stack trace.
These details often identify the specific API or assembly that is failing. If you can provide this information, it will be much easier to determine whether the issue is due to an unsupported API on Windows 10 or another migration problem.
4. Review UWP-specific or OS-specific APIs used after migration
When migrating from UWP to WinUI 3 desktop, it’s possible that some UWP-specific APIs remain in the code. These can cause problems when running as a desktop app, especially on older OS versions.
Please review your code (especially app startup code such as App constructor, OnLaunched, and the first page’s constructor / Loaded handler) for:
- UWP namespaces such as
Windows.UI.Xaml.*.
- UWP-only APIs, e.g.:
-
Windows.UI.Core.CoreWindow,
-
Windows.UI.ViewManagement.ApplicationView,
- Some members of
Windows.ApplicationModel.* and Windows.System.* that assume a UWP container.
- Any APIs introduced in Windows 11 that might not exist or behave the same on the Windows 10 build you are targeting.
If one of these APIs is invoked during startup and is not available on the Windows 10 device, it can cause the app to terminate with a native exception.
5. Confirm project type and migration approach
Please also confirm that:
- The project is created from a WinUI 3 (Windows App SDK) desktop app template (for example, “Blank App, Packaged (WinUI in Desktop)” in Visual Studio).
- You are not using the original UWP project type with partial WinUI 3 references.
If you migrated by directly modifying the existing UWP project, a more reliable approach is:
- Create a new WinUI 3 desktop (packaged) project in Visual Studio.
- Move your XAML, ViewModels, and business logic into this new project.
- Reconfigure capabilities and manifest settings as needed.
- Check the Windows App SDK version and
TargetDeviceFamily as described above.
- Build, deploy, and test on both Windows 11 and the target Windows 10 device.
To further investigate, it would be helpful if you could provide:
- The Windows 10 version and build number from the affected machine (
winver dialog).
- The Windows App SDK package reference (name and version) from your
.csproj.
- The
TargetDeviceFamily element from your Package.appxmanifest.
- The .NET Runtime event details from Event Viewer (exception type, message, and the first part of the stack trace).
Hope this helps