microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.81k stars 320 forks source link

Packaged app cannot be installed if uap5:DriverDependency section in appxmanifest.xml is set without any content #4123

Open petercoin opened 1 year ago

petercoin commented 1 year ago

Hi, I'd like to know is it an expected behavior that the installation will be abandoned if the uap5:DriverDependency section is declared in the appxmanifest file without any valid content like

    <uap5:DriverDependency>
      <!--<uap5:DriverConstraint Name="xxx_hsa.inf" MinVersion="1.1.1.1"/>-->
    </uap5:DriverDependency>

My application is packaged by Windows Application Packaging project. The installation process will be stopped with error code: 0x80073CFD and it will show the device drivers are missing but it doesn't show any driver information. I think this is caused by the empty driver information in XML above section.

DrusTheAxe commented 8 months ago

expected behavior that the installation will be abandoned if the uap5:DriverDependency section is declared in the appxmanifest file without any valid content

Confirmed. The manifest schema allows <uap5:DriverDependency> to have no child elements but the deployment pipeline processing this expects at least 1. So don't specify DriverDependency if you have no DriverConstraint(s). In your example broaden the comment

    <!--
    <uap5:DriverDependency>
      <uap5:DriverConstraint Name="xxx_hsa.inf" MinVersion="1.1.1.1"/>
    </uap5:DriverDependency>
    -->

Thanks for reporting this. I've opened a bug as we shouldn't fail here but it's relatively low priority given how easily it's worked around. Plus it's easily detected by any testing so it shouldn't get past development into the wild.

DrusTheAxe commented 8 months ago

FYI fix tracked via https://task.ms/48822670