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

One of the common error that you may encounter when you try deploy a SharePoint solution is :

Error 36 Error occurred in deployment step 'Activate Features': Cannot complete this action.
Please try again.

After analyzing the SharePoint log files I found out the error bellow :

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

The error above has been caused by the manipulation bellow :

In this project I had only one feature that contained the list definition and the list instance and then I have created a new feature scoped site and move the list definition to it. I kept the list instance in the scoped web feature.

In order to fix the problem, you have to edit the element.xml of the list instance and add the featureid attribute. The feature id attribute should be the id of the list definition's feature.

Here is a sample element.xml file.


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="
http://schemas.microsoft.com/sharepoint/">
  <ListInstance Title="ListInstanceName"
                OnQuickLaunch="TRUE"
                TemplateType="10000"
                FeatureId="644d32f3-30d8-441f-a24c-84cd3931cdf0"
                Url="Lists/ListInstanceName"
                Description="My ListInstanceName">
  </ListInstance>
</Elements>

Enregistrer un commentaire