Hello,
I have an unmanaged solution in a DEV environment where for some reason I have deleted the component library for the model-driven app.
After that, I created a brand new component library from scratch, published the solution, exported the solution as managed to import it back into my PROD environment to apply the new upgraded version.
After waiting for 41 mins, I got that the solution had failed with the following error message:
Import of app module(s) failed: 'The' app cannot be associated to more than one component library. Already exist component library count Microsoft.Xrm.Sdk.DataCollection`1[Microsoft.Xrm.Sdk.Entity]. In Solution Import, please remove library either from Source or Target and try again. I have already removed the old component library from my source environment, so we cannot have two component libraries for one model-driven app
I have already removed the old component library from my source environment, as we cannot have two component libraries for one model-driven app.
The solution is managed and I don't want to delete it in PROD because I have live data.
What will be the solution to this problem to force remove the component library from the production, and re-import the one exported from the DEV environment?
Do we have to investigate in the customizations.xml of the solution or a Web API that deletes the component library or a tool on xrmtoolbox that removes that from the prod environment?
Any help is greatly appreciated.
Thank you
Hello @KruthiHegde ,
It also worked for me with the way and steps I provided so it should also work for you in the UAT environment if you follow the same steps.
Please accept my post as a solution if it helped you.
Best regards,
Julien
@Julien2 That worked for me, Thanks a lot. Now with the deployment to UAT, I have the same issue as you. I was thinking if I can run the same code in target environment and delete the app element record and try importing the solution
Hello @KruthiHegde ,
I still did not resolve the issue yet I am still finding a way to remove the component from the managed solution.
No, you're not missing anything If you run again the first step which is the web API after publishing you should notice the ID that you passed in the parameter does not exist anymore.
I will keep you posted If I found the solution.
Best regards,
Julien
@Julien2 Thanks for the reply. I am getting the below undefined response when I execute the above code
Is there anything that I am missing?
Also how did you fix the problem with deployment, I may soon run into the same issue with deployment.
Thank you.
Hello @KruthiHegde ,
The following steps might help you to delete the component library from the Model Driven App element table:
Pass the ID of the component library in the parameter above.
In my case, I deleted it from the sandbox and it worked very well, however, when I try to upgrade the solution, it keeps failing to replace the old one with the new component library.
I hope the above is helpful for you.
Best regards,
Julien
Hi @Julien2 , I am facing a similar issue with component library. Did you find any solution?
Any help on this is much appreciated. Thank you
WarrenBelz
87
Most Valuable Professional
mmbr1606
71
Super User 2025 Season 1
Michael E. Gernaey
67
Super User 2025 Season 1