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.
- 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.
No comments:
Post a Comment