Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio Issue With DeviceCapability in Package Manifest #2

Open
MelbourneDeveloper opened this issue Jul 7, 2018 · 2 comments

Comments

@MelbourneDeveloper
Copy link

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?

@MelbourneDeveloper
Copy link
Author

This the the thread I've started on the topic:
https://stackoverflow.com/questions/51219062/uwp-usb-hid-device-wont-connect

Visual Studio is giving this error:

Severity Code Description Project File Line Suppression State Error Validation error. error C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 36, Column 15, Reason: 'vidpid:‭2C97‬ 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:‭2C97‬ 0001' failed to parse. LedgerWalletUWPSample C:\GitRepos\ledger-dotnet-api\LedgerWalletUWPSample\bin\x86\Debug\AppxManifest.xml

The Regex is actually different to the definition here

@MelbourneDeveloper
Copy link
Author

Is there any chance you could look at this repo?
https://github.com/MelbourneDeveloper/ledger-dotnet-api

You can see that the UWP project won't compile because the Device ID doesn't match the pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant