Skip to content

Unable to deploy WinUI App after updating to 8.0.10, 8.0.14, 8.0.20, or installing VS 17.10 #21744

Closed
@GXSA-Qi

Description

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

  1. 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
  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.
image
(The Nuget package version used is shown in the figure)
image
4.Upgrade the nuget package version to 8.0.20.
image
5.Compile the program again and find that the program cannot run normally.
image
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

Metadata

Assignees

No one assigned

    Labels

    area-toolingXAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debuggingi/regressionThis issue described a confirmed regression on a currently supported versionplatform/windows 🪟s/needs-attentionIssue has more information and needs another looks/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions