When attempting to import a solution in Dynamics 365, you encounter the following error:
"The import of solution: [solution name] failed.
Error code 8004f016"
The grid within the error dialog includes a row of Type = Mappings. The detail text shown for this row is the following message:
"A managed solution cannot overwrite a AttributeMap component on the target system that has an unmanaged base instance. The most likely scenario for this error is that an unmanaged solution has installed a new unmanaged AttributeMap component on the target system, and now a managed solution from the same publisher is trying to install that same AttributeMap component as managed. This will cause an invalid layering of solutions on the target system and is not allowed."
Download the XML log file and open in Excel. In the Components tab locate the cell: 0x8004F016
In the next column will be an error message that includes the id of the component:
"A managed solution cannot overwrite the AttributeMap component with Id= [component ID] which has an unmanaged base instance. The most likely scenario for this error is that an unmanaged solution has installed a new unmanaged AttributeMap component on the target system, and now a managed solution from the same publisher is trying to install that same AttributeMap component as managed. This will cause an invalid layering of solutions on the target system and is not allowed."