Wednesday 1 August 2018

Dynamics CRM: Delete Components From Managed Solution


Currently I have faced a scenario where I need to remove few unused components from my managed solution in Production Instance.

My first approach was remove unused components from my solution in Dev instance and export as managed solution than re-import in Production. But this approach not worked for me.

So, my second approach was delete unused components from my solution in Dev instance and export as managed solution than re-import in Production. But this approach also not worked for me.

Finally, I found one approach that works and fulfill my requirement. Here I am sharing my final approach, and this also work in supported way.

I will try to explain this with a simple example where no dependencies components are present.


  • I have created one solution named Solution1 in Dev instance and create a two new entities Entity1 and Entity2 in that solution and publish all customization.









  • Export Solution1 as Managed Solution from Dev and import in Production Instance. This will create Entity1 and Entity2 and my Production Instance.






  • Now create new solution named Solution2 in Dev Instance and add Entity1. Here we have not added Entity2 in this solution because we need to delete Entity2 from all Instance as result.








Note: - If number of components are larger, than use Xrmtoolbox “Manage Solution” Plugin to create clone to solution. And remove unused component from newly created solution.










  • Export Solution2 as Managed Solution from Dev and import in Production Instance. This will not create any entity but hold Entity1 as another managed solution layer.







  • Delete managed solution Solution1 from your Production instance. This will delete solution and its component but Entity1 will remain in your Production Instance due to Solution2.







  • Now Delete Entity2 from Dev instance and publish all customization.








  • Export Solution1 as Managed Solution from Dev and import in Production Instance. This will not create any entity but hold publisher, solution name all other components as it was required in this approach. 
Expected Result: -








  • Delete managed solution Solution2 from Production and Dev instance to clean instance.

 With this approach, I was able to remove my all unused component from my solution. Also, solution name is same and no need to data backup and reimport. But solution Installed On date is changed which was not important in my use case.

No comments:

Post a Comment

Field Security Profile - Based on Owner

 Recently received requirement related to Field security profile. Expectation : - 1.       Set to users need access of secure attributes. 2....

Test