Canvas app code component error "Couldn't import components"

If you are developing code components (PCF) for canvas apps you'll be used to using the 'Get more components' panel. When adding the code-component to the canvas app, occasionally you will receive the somewhat unhelpful error:

Couldn't import components

 There are no more details provided in the expanded down arrow area:

I'm putting this here for my future self (who always seems to forget about this issue) and anyone else who comes across this error.

The cause is usually because you have a property-set that has the same name as an in-build property or one of your own (e.g. Enabled/Selected)

The resolution is simply to prefix your property-set names with the name of the data-set:

<data-set name="Items" ... >
<property-set name="ItemsSelected" .. />
<property-set name="ItemsEnabled" .. />

Hope this helps!



Comments are closed