Showing posts with label SharePoint list instance error. Show all posts
Showing posts with label SharePoint list instance error. Show all posts

Saturday, April 26, 2014

SharePoint 2013 feature deployment error: Failed to get the list schema XML for feature in GetUserListSchema()

While deploying SharePoint solution I got an error saying that

Error occurred in deployment step ‘Activate features’: Cannot complete this action. By checking the error in logs I have found the exception details as

GetUserListSchema(): Failed to get the list schema XML for feature

By digging into the issue I have found that there is some scope activation details we are unable to deploy this feature. In the code I have added a list definition and list template associated to that list definition. I have added a new feature scoped with site and moved List definition feature to that. So here I have changed the List definition scope from web to Site and kept list template on the same scope. While deploying the feature I got the error on that.

To fix this issue we have to edit the list instance elements.xml file and need to update the list definition feature id in elements.xml file.  
We can update the list inastance elements.xml as

  <ListInstance Title="Name of the list instance"
                TemplateType="10000"
                FeatureId="List definition Feature ID"
                Url="Lists/InstanceName"
                Description="List instance description">
  </ListInstance>



By updating the feature id, Iam able to deploy the solution without issues. Hope this helps.