[UWP]我在哪里可以记录此错误?

人气:381 发布:2022-09-22 标签: wpdevelop

问题描述

UWP平台有一个用于与Hid设备通信的API。我已成功集成了名为Trezor的USB硬件设备。我把它放在我的包装清单中,一切都很好:

The UWP platform has an API for talking to Hid devices. I have successfully integrated with a USB hardware device called Trezor. I put this in my package manifest, and all is well:

  <Capabilities>
    <Capability Name="internetClient" />
    <uap:Capability Name="removableStorage" />
    <DeviceCapability Name="humaninterfacedevice">
      <Device Id="vidpid:534C 0001">
        <Function Type="usage:0005 *" />
        <Function Type="usage:FF00 0001" />
        <Function Type="usage:ff00 *" />
      </Device>
    </DeviceCapability>
  </Capabilities>

但是,我需要能够包含类似这样的设备:

However, I need to be able to include a similar device like this:

  <Capabilities>
    <Capability Name="internetClient" />
    <uap:Capability Name="removableStorage" />
    <DeviceCapability Name="humaninterfacedevice">
      <Device Id="vidpid:‭2B24‬ 0001">
        <Function Type="usage:0005 *" />
        <Function Type="usage:FF00 0001" />
        <Function Type="usage:ff00 *" />
      </Device>
    </DeviceCapability>
  </Capabilities>

我收到此错误:

验证错误。错误C00CE169:应用清单验证错误:应用清单必须按照架构有效:第44行,第15列,原因:'vidpid:2B24 0001'违反'any | vidpid的模式约束:[0-9a-fA- F] {4} [0-9a-fA-F] {4}((usb | bluetooth))?| model:[^;] {1,512};。{1,512}'。 值为'vidpid:2B24 0001'的属性'Id'无法解析。 &NBSP; Hardfolio.UWP&NBSP;&NBSP; C:\ GitRepos \ Coins \ src \Hardfolio \Hardfolio.UWP \bin \ x86 \ Debug \ AppxManifest.xml

Validation error. error C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 44, Column 15, Reason: 'vidpid:‭2B24‬ 0001' violates pattern constraint of 'any|vidpid:[0-9a-fA-F]{4} [0-9a-fA-F]{4}( (usb|bluetooth))?|model:[^;]{1,512};.{1,512}'. The attribute 'Id' with value 'vidpid:‭2B24‬ 0001' failed to parse. Hardfolio.UWP C:\GitRepos\Coins\src\Hardfolio\Hardfolio.UWP\bin\x86\Debug\AppxManifest.xml

错误源自这个回购:

https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/winrt/AppxManifestTypes.xsd

https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16299.0/winrt/AppxManifestTypes.xsd

以下是对该问题的全面讨论:

Here is a full discussion on the issue:

https://stackoverflow.com/questions/51219062/uwp-usb-hid-device-wont-connect

https://stackoverflow.com/questions/51219062/uwp-usb-hid-device-wont-connect

如何向正确的Microsoft团队报告此错误,以便他们解决?我已在此处记录了一个错误,但它已被忽略:https://github.com/tpn/winsdk-10/issues/2

How can I report this bug to the right Microsoft team so they will fix it? I have already logged a bug here and it has been ignored: https://github.com/tpn/winsdk-10/issues/2

推荐答案

好吧,我做了一个简单的测试。只要我填写"vidpid:2B24 0001",在我的清单文件中,它显示了一个错误,但如果我使用"vidpid:534C 0001",则效果很好。结合错误信息,问题很明显,Id参数是无效。你有其他类似的设备需要测试吗?

Well, I made a simple test for this. As soon as I filled "vidpid:‭2B24‬ 0001" in my manifest file, it shows me an error but it works well if I use "vidpid:534C 0001". Combine the error message, the problem is clear, the Id parameter is not valid. Do you have another similar device to test?

祝你好运,

Roy

979