WindowsAppSDK: Failed to submit to Microsoft Store because of no Microsoft.ui.xaml.dll
Describe the bug
Microsoft Store Report App Team rejects the app submission because it unexpectedly terminated at launch. The app targets .NET 6 Windows 10.0.22000 and Windows App SDK 1.0.1. Event viewer shows that unable to load DLL ‘Microsoft.ui.xaml.dll’ or one of its dependencies.
However, the app can run in my dev environment.
For reference, following are the details of the app in Microsoft Partner Center. But of course, you can’t find it directly in Microsoft Store because its first submission is rejected several times. Maybe you can contact Microsoft Store Report App Team (reportap@microsoft.com) to get details and repro.
Key | Value |
---|---|
App ID | 9NBLGGH4NBXB |
App name | 爱奇艺 Preview |
App name in English | iQIYI Preview |
Package ID | 0C72C7CD.61910B44FC902 |
Following is the file output from event viewer by Microsoft Store Report App Team.
Steps to reproduce the bug
- Create a WinUI 3 packaged app with some features. Ensure it can run correctly.
- Package it.
- Submit it to Microsoft Store.
Expected behavior
It can be available in Microsoft Store.
That means it won’t crash anymore during reviewing by Microsoft Store Report App Team and running in end-users’ devices.
Screenshots
Following is the report about the reason the team of Microsoft Store rejects the submission. It says the app crashes at launch.
Following is the screenshot that the app runs correctly in my local dev environment.
It also works well by launch from Start Menu without debug in my local environment.
NuGet package version
1.0.0
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 21H2 (22000)
IDE
Visual Studio 2022
Additional context
It says…
The process was terminated due to an unhandled exception. Exception Info: System.DllNotFoundException: Unable to load DLL ‘Microsoft.ui.xaml.dll’ or one of its dependencies: The specified module could not be found. (0x8007007E) at IQIYI.UI.Program.Main(String[] args)
Following is an excerpt from the PropertyGroup
section of the app project file (.csproj
).
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
<TargetPlatformMinVersion>10.0.22000.0</TargetPlatformMinVersion>
<AssemblyName>iQIYI</AssemblyName>
<RootNamespace>IQIYI.UI</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<Product>iQIYI</Product>
<Authors>Kingcean Tuan</Authors>
<Company>iQIYI, Inc.</Company>
<Version>6.0.160</Version>
<AssemblyVersion>6.0.160.0</AssemblyVersion>
<FileVersion>6.0.160.0</FileVersion>
<Description>iQIYI Windows app.</Description>
<Copyright>Copyright (c) 2022 iQIYI, Inc. All rights reserved.</Copyright>
<RepositoryType>git</RepositoryType>
<DefaultLanguage>zh-Hans</DefaultLanguage>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<ApplicationIcon>..\iQIYI.ico</ApplicationIcon>
Related package references.
Microsoft.WindowsAppSDK
:1.0.1
.Microsoft.Windows.SDK.BuildTools
:10.0.22000.197
.
P.S.: The app is the official UWP app in next generation of iQIYI (the top streaming platform hosted in mainland China).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 17 (3 by maintainers)
Thanks for all your help and support! Especially @hez2010 @Richasy . Finally, the app has published (its first attempt of submission is on Mar 18th).
ms-windows-store://pdp/?productId=9NBLGGH4NBXB
The app is in Preview currently and obviously there is a long way to go. We can also see that Windows App SDK also needs to continue to improve and perfect as we can expect since it still has lots of issues and incomplete features (e.g. media player element which is required by iQIYI).
Workaround
Let me summarize what I have done to work around this issue (one or more apply to).
Update reference
Microsoft.WindowsAppSDK
to the latest version inItemGroup
section of the project file (.csproj).Update
Package.appxmanifest
file to add reference toMicrosoft.VCLibs.140.00.UWPDesktop
.Rollback project file (.csproj) to make sure the TFM is not
net6.0-windows10.0.22000.0
. The modification is in itsPropertyGroup
section.Add following node in the project file (.csproj).
For reference, the app I am publishing includes customized window title bar (requires usage of
AppWindow
) and Edge WebView2.It still doesn’t work.
I have added the reference to
Microsoft.VCLibs.140.00.UWPDesktop
. Following is theDependencies
section ofPackage.appxmanifest
file.But the submission is rejected again. The reason is still that the app crashes at launch.
@DrusTheAxe could you please help to have a look?