Archives

All posts for the month September, 2015

If you’ve ever had this error pop up when deleting a managed solution on your CRM 2015 box:

The Main() component cannot be deleted because it is referenced by 1 other components. For a list of referenced components, use the RetrieveDependenciesForDeleteRequest.

You should use this to quickly get the dependency information:

First, go to the solution’s URL (will be like https://CONTOSO.CO/COCO/tools/solution/edit.aspx?id=%7b2BE0D3AD-DF66-4747-8AA0-A5BA16B146D3%7d

Then run this bookmarklet, which I call GetSolutionDependencies:

javascript: try { var cont = frames[1] || frames[0]; window.open(cont.Xrm.Page.context.getClientUrl() + "/tools/dependency/dependencyviewdialog.aspx?objectid=" + cont.APP_SOLUTION_ID.substring(1,37) + "&objecttype=7100&operationtype=dependenciesforuninstall"); } catch (e) { if (console && console.log) { console.log("Error occured: " + e); }}

It will extract the id for that solution, then go to a page in your CRM org to show more details.  Only tested in IE11 so the context may differ of course.