Find missing dependencies when deleting a solution

When deleting a solution in Dynamics CRM, the system checks for dependencies first. If any of the dependencies still exist, then the delete operation will be aborted and the user will receive an error message:

Connot Delete Component (Cannot delete Main because one or more components require it."

The only option for more info, is the Download Log File, but this doesn't tell you really what happened either:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The Main() component cannot be deleted because it is referenced by 1 other components. For a list of referenced components, use the RetrieveDependenciesForDeleteRequest.Detail:
<OrganizationServiceFault xmlns:i="" xmlns="">
<ErrorCode>-2147160033</ErrorCode> <ErrorDetails xmlns:d2p1="">
<KeyValuePairOfstringanyType><d2p1:key>0</d2p1:key><d2p1:value xmlns:d4p1="" i:type="d4p1:string">Main</d2p1:value></KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType><d2p1:key>1</d2p1:key><d2p1:value xmlns:d4p1="" i:type="d4p1:string"></d2p1:value></KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType><d2p1:key>2</d2p1:key><d2p1:value xmlns:d4p1="" i:type="d4p1:string">1</d2p1:value></KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType><d2p1:key>3</d2p1:key><d2p1:value xmlns:d4p1="" i:type="d4p1:string">Solution</d2p1:value></KeyValuePairOfstringanyType>
<d2p1:value xmlns:d4p1="" i:type="d4p1:string"><a id='a_helplink' tabindex='0' class='ms-crm-Dialog-Error-Link' onclick='openStdWin("\x2ftools\x2fdependency\x2fdependencyviewdialog.aspx\x3fobjectid\x3d\x257b703af1df-aafb-4c61-b97f-da639fbe8d27\x257d\x26objecttype\x3d7100\x26operationtype\x3ddependenciesforuninstall", null, 800, 600, null)'>Details</a></d2p1:value>
<Message>The Main() component cannot be deleted because it is referenced by 1 other components. For a list of referenced components, use the RetrieveDependenciesForDeleteRequest.</Message>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />

However, there seems to be a little bit of useful info in there. This is the section "\x2ftools\x2fdependency\x2fdependencyviewdialog.aspx\x3fobjectid\x3d\x257b703af1df-aafb-4c61-b97f-da639fbe8d27\x257d\x26objecttype\x3d7100\x26operationtype\x3ddependenciesforuninstall". When replacing some chracters ("\x2f" to "/", "\x3" to "?", "\x3d" to "=", "\x26" to "&", "\x257b" to "{" and "\x257d" to "}"), then you're presented with the url: /tools/dependency/dependencyviewdialog.aspx?objectid={703af1df-aafb-4c61-b97f-da639fbe8d27}&objecttype=7100&operationtype=dependenciesforuninstall. Add "http://[yourserver] to the beginning and you've got your url that'll tell you exactly what dependencies to remove before you can remove the (managed) solution.

A shorter approach, but just as effective would be to take this url and change yourserver and the solution guid:


Your solution guid can be found by opening the solution and pressing F11 or CTRL+N to see the url. In the url take the section between %7b and %7d: https://[yourserver]/tools/solution/edit.aspx?id=%7bC418E1D5-9AFB-E311-90E1-00155D042F50%7d) and you're set to go!


crm said...

When someone writes an article he/she maintains the plan of a user in his/her brain that how a user can be aware of 
it. So that's why this piece of writing is perfect. Thanks!

Anonymous said...

Nice article.
Thanks for this instruction.
I couldn't delete a solution and my CRM 2015 won't tell me, what dependencies there were.
With your help, the solution is gone. ;)

Brian Qing said...

Thanks for the post. It saves me a lot of time. Now the problem is, after having found the dependencies, how would I remove them?

Here is an example:
Display Name Name/Id Type Managed Solution Required by
Application Ribbons RibbonCustomization Application Ribbons Universal Search Account

I could NOT remove the dependency Application Ribbons from Account. BTW, Application Ribbons is not showing in my Client Extension.

Tomas Schulkes said...

Good article :) 1 correction:

"\x3" to "?" should be "\x3f" to "?"

Packers And Movers Mumbai said...

Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I have bookmarked more article from this website. Such a nice blog you are providing ! Kindly Visit Us @ Packers And Movers Mumbai

Local Packers And Movers Bangalore said...

I am really enjoying reading your well written articles. I think you spend numerous effort and time updating your blog.
Local Packers And Movers Bangalore