Developer 101: Help! My managed solution cannot be uninstalled…

At the moment we are developing a new CRM 2015 solution. We are using multiple staging environments: some for development, some for testing, some for integration testing and so on. When we are delevering a solution for integration testing, we deliver it as a managed solution. This way we can predict what the solution finally will do, once deployed at our customers.

So far so good. We developed a part of our functionality and wrapped it up to an unmanaged solution. The solution it self contained some webresources, some custom entities and a couple of plugins operating on those custom entities. Nothing special one would say…

We deployed the unmanaged solution to test. Our tester tested it. Then we exported the solution as a managed solution and deployed it to our integration testing environment. We tested it and afterwards we wanted to unregister the managed solution (leaving a clean environment).

Something strange happened, and I’m still struggling to find out what and why it happened


We received an error message indicating that we could not remove the solution. The xml log file contained the following message:

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

I checked and double checked (using plugin registration tool, xrmtoolbox etc) but I could not discover what was being referenced. We didn’t reference any system entities or any other system resources. I used the plugin registration tool to deregister the plugins, steps, images and plugin assembly. The error message keeps popping up, no matter what I do.

As the CRM database does not contain any valuable data (it is an testing environment), we easily can drop it and create a new organization. Somehow that doesn’t feel like a solution but more as a mediocre workaround.

Has anyone ran in a similar problem before? How did you solve it?
I need some advice…