This has been an issue for debate recently, so I decided to spend some time to investigate it. I have always been a supporter of managed solutions. But the recent debate focused around situations where managed solutions would cause deployment issues when layered over other managed solutions.
Now, if we go to the SDK, the first hint is in the “Introduction to Solutions”. The Managed Solutions paragraph spells it out:
“Managed solutions can also be layered on top of other managed solutions. As long as a managed solution enables customization of its solution components, other managed solutions can be installed on top of it and modify any customizable solution components that it provides.”
Pay close attention to the section in bold. The key is to enable customization of it’s solution components.
So what do we actually need to do in CRM?
Go to your solution (unmanaged at this point, before exporting it as a managed solution).
Look at the solution components included.
Select each component, and look at the Managed Properties.
Once you open up the Managed Properties, look at the configuration options available.
Set the Can be customized to true, and all the items you want to make customizable.
Now you can package your solution as Managed.
The guidance around this is further down in the SDK also:
“By default, the managed property settings assume that any kind of solution component is fully customizable. Solution developers are encouraged to enable solution components in their solutions to be customizable. However, there are situations where the definition of a solution component must be ”locked down” to avoid potential breaking changes or to make future maintenance of the solution component easier.”
As far as the failure to import a Managed solution over another, this can be caused by a few things. Some are more obvious than another, but they can all be mitigated through proper development practices. This is a high lever sum-up of the principle:
“… when you import a managed solution, all required components must match the package type of the solution. A component in a managed solution can only depend on another managed component.”
For additional details on solution component dependencies this is the place to start reading: