Question

I want to be able to add new list definitions and list instances to a solution by adding these to an existing feature. When I add the new items to the feature, update the version number and run Update-SPSolution I can see that the new list definition is installed. Then I do the feature.Upgrade($false) in the right site in Powershell and I can see that the feature is updated but the new list instances are not added.

Should it be possible to add new list instances like this? Or do I have to write custom logic in the feature event receiver to do this manually?

Was it helpful?

Solution

Just to upgrade the feature is not going to to it, I had to specify the addition of elements on upgrade explicitly in the feature manifest like this:

<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
    <UpgradeActions>
      <VersionRange BeginVersion="1.0.0.0" EndVersion="1.0.0.1">
        <ApplyElementManifests>
          <ElementManifest Location="TestListInstance\Elements.xml" />
        </ApplyElementManifests>
      </VersionRange>
    </UpgradeActions>
</Feature>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top