microsoft / vscode-iot-workbench

Azure IoT Device Workbench for Visual Studio Code
170 stars 74 forks source link

Couldn't generate code from the DevKit pnp schema from IoT Central #878

Closed arthma closed 4 years ago

arthma commented 4 years ago

Repo step:

  1. Export the pnp schema from IoT central for MXChip IoT DevKit
  2. Run 'Generate Device Code Stub.' on IoT Device Workbench extension for VS Code, fails with error image
dooriya commented 4 years ago

Thanks @arthma for your feedback.

The root cause of the error is due to IoT Central uses a device template which is not align with official DTDL. An extra "contents" property is not supported in a DCM file currently, We've already expose this issue to Central team and they will fix this template format in the upcoming release.

If your scenario is to generate and customize PnP code for IoT DevKit, please use the pre-certified DCM file for DevKit from public model repository.

Please feel free to re-open this issue if this still occur with the official DevKit DCM.

Thanks, Dooriya