CMake bug? Building for Microsoft Store. App does not start up properly

What works

  • The app builds, installs to bin folder, gets packaged, gets bundled, gets signed.

  • I can install it on my Windows 10 PC (if using a local self-signed certificate).

  • Alternatively I can upload it to Microsoft Partner Center, where it passes automated certification, and I can install it on my Windows 10 PC via the Microsoft Store app.

What doesn’t work

  • When the app starts up, the Windows splash screen for the app appears in a separate window to the app and they are shown simultaneously. The splash screen should have disappeared as soon as the app started.

  • If I close the splash screen, it has no impact and the app continues.

  • If I close the app window, the app quits, closing both windows, but it also results in an error log shown below.

  • If I leave the app running, it will crash within 5 minutes and create the same error log.

How to reproduce

Further info

  • This is a critical, blocking issue preventing my client from publishing the release of their app.

  • That app is a Qt QML app. I started troubleshooting with a minimal Qt app that reproduced the issue and logged it with Qt as a bug. They verified the problem and ultimately showed that the problem exists even if you remove all traces of Qt. See this bug report.

  • The minimal project above was created by me and Oliver Wolff (Qt), but has no Qt references within it.

  • They provided a workaround, which was to include in the app manifest the capability “runFullTrust”. This did indeed resolve the starting up issue. However, it also causes the app to be flagged to Microsoft, requiring justification for the use of this “restricted” capability. As I have no need for this capability, obviously I cannot justify it.

Screenshot of the error log (Event Viewer > Windows logs > System):

Screenshot of Microsoft Partner Center flagging the restricted capability:

This refers to the final point in Further info above