Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Governance and Administ...
Answered

Removing dependent Model Driven App element

(0) ShareShare
ReportReport
Posted on by 96

Hi,

 

I've been fiddling a bit with Custom pages in my model-driven app but never actually created anything. However, I've apparently still managed to create something which has landed me in a state where my dependencies seem to be messed up.

When I run my CI/CD pipeline I get this error message:

 

Component files in D:\a\1\a\BaseloadInitialAssessment.zip\CanvasApps for canvas app cr047_baseloadinitialassessmentdefaultcommandlibrary_19649 doesn't match with its name.

 

Since I’m not about to use it anyway, I happily locate this in my solution:

 

Rydman_1-1655124511930.png

I remove it from my solution and rerun the pipeline. It gets past the point of the above error, but at a later stage (while trying to import it into another environment) it fails with this message:

 

<MissingDependencies> <MissingDependency> <Required type="300" schemaName="cr047_baseloadinitialassessmentdefaultcommandlibrary_19649" displayName="BaseloadInitialAssessment_DefaultCommandLibrary" solution="Active"/> <Dependent type="AppElement" displayName="cr047_cr047_BaseloadInitialAssessment_canvasappid_cr047_baseloadinitialassessmentdefaultcommandlibrary_19649" id.uniquename="cr047_cr047_BaseloadInitialAssessment_canvasappid_cr047_baseloadinitialassessmentdefaultcommandlibrary_19649"/> </MissingDependency> </MissingDependencies> 

 

 After some digging around in the source solution I find this dependency on my model-driven app:

 

Rydman_2-1655124605910.png

So, although the component library is removed from the solution, some association with my app still exists. I’ve been hunting high and low for a way to remove the dependency but with no luck.

 

Any help here much appreciated!

Categories:
  • ABG_Solita Profile Picture
    3 on at
    Re: Removing dependent Model Driven App element

    I tried this, and it worked for me... So thank you for posting this.
    But it wasn't enough just to run the manual cloudflow. I had to publish the app as well to be able to delete the component library. 

    I verified with the API endpoints: [ORG URL]/api/data/v9.0/appelements

    Thank you for posting the screenshots as well.

  • CU01082049-0 Profile Picture
    on at
    Re: Removing dependent Model Driven App element

    Thank you all for hints here. I discovered an easier way to get rid of the lurking Model-Driven App Element. If you're a Power Automate maker, then you can easily get rid of the pesky record by creating a Flow as pictured.

    DeleteModelElement.jpg

    To be safe you can run the flow without the Delete action first to check if indeed that is the Model-Driven App Element you're trying to get rid of. If all is good, you can then add the delete action and get rid of the record.

     

    Then go back to your solution (I've read that you should wait 3-5mins and/or publish your app once more) and under Show dependencies, the component should have none. You can now delete it from your environment and you'll be good.

  • Youcef Profile Picture
    on at
    Re: Removing dependent Model Driven App element

    Hi,

    I have a similar problem. I think I tried to add a button to call a canvas App but did not do it finaly then suppressed the button.

    Today I need to import my solution in another environment and get the same error and thus I am blocked.

    Any help would be most welcome.

    Youcef

     

     
  • FU Microsoft Profile Picture
    112 on at
    Re: Removing dependent Model Driven App element

    Unfortunately, the article linked in this post does not provide the necessary information. The button that I was going to add is not in the Command Bar, so I can't simply delete the button so that the Model-Driven App Element is removed. Is there another way to solve this issue?

  • HaydnTH Profile Picture
    9 on at
    Re: Removing dependent Model Driven App element

    I've run into this same issue today, and did some digging into the what/why/how this was happening (As I actually needed my command library)

     

    From what I can tell. The PP build tools in DevOps are matching the name of the CanvasApp record to the customizations.xml.

    The problem comes from adding PowerFX enabled commands. When you create your first command for a model driven app, Microsoft somewhat helpfully create you a Component Library, the name of this takes the format;

    [PublisherPrefix]_[AppSchemaName]defaultcommandlibrary_[5didgetcode]

    and from what I can see there is no way to create your own and link it to the model driven app with a pre-defined name.

     

    The CanvasApp folder will truncate this name if it's over 45 characters. Taking into account that 25 are taken up by enforced characters, this only leaves 20 for the publisher prefix and app name, note it doesn't take the full app name, just the part after the publisher prefix.

    However, this seems to be the cause of the PP tools failing in devops.
    Unfortunately short of recreating the model driven apps with a shorter name, I am at an absolute loss as to what to do if you actually need the component library in your solution and want to use the PP build tools for easier solutions in devops.

  • Rydman Profile Picture
    96 on at
    Re: Removing dependent Model Driven App element

    Hi @ChrisPiasecki ,

     

    Well, that was precise and to the point! I climbed a fair bit on my steep learning curve :).Thanks!

  • Verified answer
    ChrisPiasecki Profile Picture
    6,389 Most Valuable Professional on at
    Re: Removing dependent Model Driven App element

    Hi @Rydman,

     

    Sorry, the unique name of the model-driven app element has "canvasappid" in it misleads a bit as its not actually a Canvas app, but a "Model-Driven App Element".

     

    It seems like this doesn't show up in the maker portal properly and you'll need to programmatically delete it. Here is an article that walks through how you can identify the ID of the element, and then use LINQPad to delete it.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

     

     

  • Rydman Profile Picture
    96 on at
    Re: Removing dependent Model Driven App element

    Hi @Chris ,

     

    Thanks for your quick reply. My problem is that I don't have a Canvas app in my solution. Something probably got created when I begun to try out custom pages in my model-driven app, but I can't find anywhere in the app (which is associated with the resource as per its dependency listing) where I could somehow remove/delete it.

  • ChrisPiasecki Profile Picture
    6,389 Most Valuable Professional on at
    Re: Removing dependent Model Driven App element

    Hi @Rydman,

     

    As per documentation, you need to remove the component library from your Canvas App (then save/publish if applicable) before you delete the component library from the solution. 

     

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Governance and Administering

#1
bscarlavai33 Profile Picture

bscarlavai33 5 Super User 2025 Season 1

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 4 Super User 2025 Season 1

#3
Vince_K Profile Picture

Vince_K 2

Overall leaderboard

Featured topics