When attempting to import a solution in Dynamics 365, you encounter the following error:
"This solution package cannot be imported because it contains invalid XML. You can attempt to repair the file by manually editing the XML contents using the information found in the schema validation errors, or you can contact your solution provider.
Error code 8004801a."
If you click Technical Details, you see the following message along with additional error details:
"Schema validation of the customizations.xml file within the compressed solution package file failed. To manually validate and edit the file, you can download the schema file here and use an XML editor that supports schema validation to get more details."
A solution package contains Dynamics 365 customizations that are stored as XML. This XML has a specific schema definition that identifies which elements are valid. If the XML contains elements that are not valid according to the schema definition, this error message will appear when trying to import the solution.
Check if the details match a known issue
Click the option to view the Technical Details and see if it matches any of the following known issues:
If you had manually modified the customizations XML
Click the Technical Details link within the error dialog. You will then see additional details about what invalid elements are found in the XML. The message also includes a link to download the schema file that can be used with an XML editor that supports schema validation. After correcting any invalid elements in the XML, attempt to import the solution again.
For more information, see Edit the customizations XML file with schema validation
If you received the solution from a solution provider
Contact your solution provider.