Home > Deployment, Features, SharePoint > ActivationDependencies – Feature Scope

ActivationDependencies – Feature Scope

    This weekend I got in to an Issue while helping a friend of mine. Some back ground about the issue.

    We have three features. Say for example.

  • FieldsX Scoped at Site.
  • ContentTypeX Scoped at Site.
  • ListX Scoped at Web.

ListX has its Dependency as ContentTypeX; ContentTypeX has its dependency as FieldsX.

I installed all the features, and when I try to activate the ListX feature I get an Error

           “Dependency feature ‘ContentTypeX‘ (id:GUID of ContentTypeX) for feature ‘ListX‘ (id:Guid of ListX) is not activated at this scope.”

    I changed ListX Scope to Site and activated the Feature, thinking that ActivationDependencies should be  between Features of Same scope, though it worked but that is not the case, because we can have Cross Scoped Dependencies as well provided we follow the rule of thumb mentioned in this Article.

“Extract from the Above Article…If the Feature that is depended upon is not activated, activation of the depending Feature fails. For example,if a Web site–scoped Feature depends on a site collection–scoped Feature that is not activated, provisioning of the Web site Feature (or of a site definition that contains such a Web site Feature) fails.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: