Skip to content

Visual Studio Issue With DeviceCapability in Package Manifest #2

@MelbourneDeveloper

Description

@MelbourneDeveloper

Hi,

I've traced a problem in Visual Studio back to a schema in this repo, so I'm logging and issue here, but please forward me to the correct place if this is not the place to be posting this issue.

My app connects to several USB devices. The first device I am connecting to has a VendorId of 534C and I have no issue connecting to this, but the other device I have has a VendorId of 2C97. Visual Studio complains about the number and says that it doesn't match the schema http://schemas.microsoft.com/appx/manifest/types:ST_DeviceId . I tracked that schema down in this file in this repo:

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

This is the XML:

  <xs:simpleType name="ST_DeviceId">
    <xs:restriction base="m:ST_NonEmptyString">
      <xs:pattern value="any"/>
      <xs:pattern value="vidpid:[0-9a-fA-F]{4} [0-9a-fA-F]{4}( (usb|bluetooth))?"/>
      <xs:pattern value="model:[^;]{1,512};.{1,512}"/>
    </xs:restriction>
</xs:simpleType>

The XML I am trying to put in the manifest is this:

      <Device Id="vidpid:‭2C97‬ 0001">
        <Function Type="usage:0005 *" />
        <Function Type="usage:FF00 0001" />
        <Function Type="usage:ff00 *" />
      </Device>

But, Visual Studio complains saying that it doesn't match the schema. Judging by normal Regex, the value '2C97‬ 0001' should match though. I tried this expression

[0-9a-fA-F]{4} [0-9a-fA-F]{4}

here:

https://regexr.com/

And got a match on 2C97‬ 0001

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions