My SharePoint 2016 development environment was throwing an exception after saving sites as template.
I discovered that the issue occurred during the solution activation, it was a validation error:
“The ‘ListInternal’ attribute is not allowed”
I’ve found xsd schema in the Hive folder at this path:
“C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\TEMPLATE\XML\wss.xsd”
Comparing this file with another one took from a working enviroment, I’ve found that “ListInternal” attribute was missing.
Adding this string to wss.xsd solved the issue:
<xs:attribute name="ListInternal" type="xs:string" />
Hope this helps 🙂
EXCEPTION:
Microsoft.SharePoint.SPException: Feature definition with Id 0644a50d-3451-4534-916a-40b6316ef791 failed validation, file ‘aaaaaaListInstances\ElementsFields.xml’, line 533, character 265: The ‘ListInternal’ attribute is not allowed.
at Microsoft.SharePoint.Administration.SPSolutionPackage.FeatureXmlValidationCallback.XmlValidationCallBack(Object sender, ValidationEventArgs evtargs)
at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(String code, String arg)
at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String lName, String ns, XmlValueGetter attributeValueGetter, String attributeStringValue, XmlSchemaInfo schemaInfo)
at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute(String localName, String namespaceUri, XmlValueGetter attributeValue, XmlSchemaInfo schemaInfo)
at System.Xml.XsdValidatingReader.ValidateAttributes()
at System.Xml.XsdValidatingReader.ProcessElementEvent()
at System.Xml.XsdValidatingReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.XmlReader.IsStartElement()
at Microsoft.SharePoint.Utilities.SPUtility.XsdValidateXml(XmlTextReader xmlStreamReader, String friendlyName, String pathXsdFile, String tagExpectedRootNode, Int32 desiredPathVersion, ValidationEventHandler xsdValEventHandler)
at Microsoft.SharePoint.Administration.SPSolutionPackage.SolutionFile.ValidateFeatureXmlFile(String rootTagElement)
at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElementsCore(XmlNodeList nodeList, String strFeatureDirRelativeToCabFile, Guid featureId, Dictionary`2 filesAdded)
at Microsoft.SharePoint.Administration.SPSolutionPackage.AddFeatureElements(XmlNode root, String strFeatureDirRelativeToCabFile, String strFeatureXmlFilename, Guid featureId)
at Microsoft.SharePoint.Administration.SPSolutionPackage.WspSolutionFeature.ProcessFeatureXml()
at Microsoft.SharePoint.Administration.SPSolutionPackage.InitSolutionFeatures(XmlNode root)
at Microsoft.SharePoint.Administration.SPSolutionPackage.ProcessSolutionManifest()
at Microsoft.SharePoint.Administration.SPSolutionPackage.Load()
at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.CreateSolutionPackage(SPRequest request, String name, String signature, Byte[] fileBytes)
at Microsoft.SharePoint.SPUserSolutionCollection.c__DisplayClass4.b__0()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPUserSolutionCollection.AddOrUpgrade(SPListItem item, SPUserSolution existingSolution)
at Microsoft.SharePoint.SPUserSolutionCollection.Add(Int32 solutionGalleryItemId)
at Microsoft.SharePoint.SPSolutionExporter.ExportWebToGallery(SPWeb web, String solutionFileName, String title, String description, ExportMode exportMode, Boolean includeContent, String workflowTemplateName, String destinationListUrl, Action`1 solutionPostProcessor, Boolean activateSolution)

Thank you! I received this same error attempting to run the Configuration Wizard on a SharePoint 2016 trial virtual machine in Microsoft Azure, and your solution fixed that problem as well.
Indeed! This error exists on the default install of SharePoint 2016 trial in Microsoft Azure. Thank you for blogging about it!
I got this error when tried to activate a site template wsp, saved from SP2016. This solution worked well. Thank you!
Thnx!!! You save our day! )
Maurizio, did you ever discover what caused this missing ListInternal attribute in the schema?
Not actually, I think the issue derives from the .ISO file I’ve used to install SharePoint… I’ve installed it several other times without any problems.
Thanks Maurizio… I had a similar issue, but one of my peers used the same image without the problem….frustrating. 🙂
Thanks a lot! This helped me out!
I had this error after installing the November 2016 CU and running PS Config. Seems like a bug in the installer. Your fix worked. Thanks for posting!