maui: Unable to deploy WinUI App after updating to 8.0.10, 8.0.14, 8.0.20, or installing VS 17.10
Information
It looks like this is a bug in the Windows OS that went out beginning of March related to deploying the WinAppSDK runtime that’s packaged with the WinAppSDK nuget. There is a planned OS update in the near future that will resolve this issue.
Workaround
2 available workarounds
-
Manually install the runtime that corresponds to the version you are using https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads
- MAUI 8.0.20+ is 1.5.2
- MAUI 8.0.10-8.0.14 is 1.4.2
-
Set the project property in your MAUI app project. Ideally workaround 1 works for you. Disabling the DeploymentManager will cause some features of WinUI to no longer work.
<PropertyGroup> <WindowsAppSdkDeploymentManagerInitialize>false</WindowsAppSdkDeploymentManagerInitialize> </PropertyGroup>
Description
The program fails to compile after version 8.0.20 of the Microsoft.Maui.Controls and Microsoft.Maui.Controls.Compatibility packages.
Steps to Reproduce
1.Use visual studio 2022 to create a new MAUI project file.
2.Compile and run it on Windows platform, and the program starts normally.
(The Nuget package version used is shown in the figure)
4.Upgrade the nuget package version to 8.0.20.
5.Compile the program again and find that the program cannot run normally.
The exception information is as follows:
引发的异常:“System.Runtime.InteropServices.COMException”(位于 WinRT.Runtime.dll 中) WinRT 信息: 找不到元素。
Link to public reproduction project repository
No response
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
8.0.14 SR3.1
Affected platforms
Windows
Affected platform versions
Windows 11,version 22631.3296
Did you find any workaround?
No response
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 21 (12 by maintainers)
Commits related to this issue
- [C] Propagate resources when reparenting - fixes a bug when the theme is changed while the control/page isn't parented. Should fix @LeDahu22 reported issue of #21744 — committed to dotnet/maui by StephaneDelcroix 3 years ago
- [C] Propagate resources when reparenting - fixes a bug when the theme is changed while the control/page isn't parented. Should fix @LeDahu22 reported issue of #21744 — committed to dotnet/maui by StephaneDelcroix 3 years ago
- [C] Propagate resources when reparenting (#21879) * [C] Propagate resources when reparenting - fixes a bug when the theme is changed while the control/page isn't parented. Should fix @LeDahu22 ... — committed to dotnet/maui by StephaneDelcroix 3 years ago
- [net8.0] Merge main to net8.0 (#22219) * [iOS] Fix crash closing Popup with WebView (#21718) * Added repro sample * Fix the issue * Added UI Test * Updated csproj * More changes * R... — committed to dotnet/maui by rmarinho 3 years ago
This is a screenshot: