Thursday, August 11, 2011

SharePoint Feature Activation Dependency

While provisiong two dependent(one on the other) content/solutions through different features, it is that one of the features might need the resources of other while gettting activated. In this scinario the first feature should be activated before the second, to avoid the dependency issues.

Feature 1. Custom Content Type
Feature 2. Page with Custom Content Type (dependent on custom content type)

To make sure the same through feature provisioning instead manually, we have feature activation dependency attribute which can be specified in feature.xml file. Which doesn't allow to get activated unless until the dependency feature(s) is activated.

Title="Feature Dependency: Page with Custom Content Type"

Description="Feature Activation Dependency: Page with Custom Content Type."






Note: Multiple dependencies can be specified for one feature.

No comments:

Post a Comment