Last week I was trying to import a manage solution into a new Microsoft dynamics CRM 2013 organization and I get the following error:
"The import file is invalid. XSD validation failed with the following error: 'The 'distinct' attribute is not declared."
After digging around the customization XML file from the solution, I found out that one of the user of my company build some custom charts and put the distinct property into an attribute inside the fetchXML tag.
We contacted the Microsoft CRM support team and asked if it were possible to have a distinct property associated with the attribute tag. After a couple of days this was the reply from them:
“I've confirmed internally that using the distinct property at attribute level on fetchXML is not allowed, as proved by the XSD validation schema you got.
On Dynamics CRM SDK we have some FetchXML queries that contains this property and it might be possible that the SDK will be changed to show the correct data that can be used.
We apologize for the situation caused by this, and we suggest you to move the distinct property to fetch tag and to not be used on attribute tag.”
The solution to this problem:
- Unzip the solution zip file.
- Open the customizations.xml file.
- Remove or put the distinct= ”true” (only the ones that used with an attribute) into the fetch tag.
- Save the customizations.xml file.
- Delete the original XML in the zip file and add this new customizations.xml.
- Import solution.