CanvasApps for canvas app doesn’t match with its name

On this episode of “obscure bugs I encountered in things”, I had this very strange one in Power Apps / Dynamics 365 after using the new Command Bar editor.

The new command bar editor for Dynamics 365 gives you a much nicer experience than the old approach of either manually pulling apart exported files or using the 3rd party Ribbon Workbench.

When you first make any changes to the Command Bar using Power FX, you are warned that it will create a “Component Library” in Dynamics. No objections from me at this point.

However, future solution exports from Dynamics can hit this error:

CanvasApps for canvas app {component name} doesn't match with its name

From the name of the component, I was able to tell that it was the Component Library causing the problem with solution export. But when I reverted my Command Bar experiment and went to delete the Component Library, I found I was unable, due to a dependency within the Model Driven App.

However, on editing the Model Driven App, there was no trace of the Component Library anywhere, to be able to remove it.

Luckily the internet has come to the rescue, and this solved question explains the problem, while this blog post has the solution.

TL;DR: It happens when the component library name is too long, due to a truncation causing a mismatch. Since the UI doesn’t have any option to undo the change to the Model Driven App, you have to delete the offending component programmatically (e.g. with LinqPad).

A real shame that there are really tricky issues like this with a lot of the new tooling, which otherwise looks like it will be much better than the old approach.

Leave a comment

Your email address will not be published. Required fields are marked *