Question

I have three features in a solution:

  • A Web-scoped feature (A): has a FeatureActivated call to set up a site
  • A Site-scoped feature (B): contains WebParts A uses
  • A stapling feature (C): staples A to a site definition

Is it possible to have a Feature Dependency from A onto B that will cause B to be automatically activated? I've tried it in various combinations using the standard Feature Dependency section on feature A, but the activation always fails.

If this isn't possible using the standard method, is there an alternative method I can use?

Was it helpful?

Solution

Since you're already having a feature receiver for (A), you could easily in your FeatureActivated method of (A) in code activate feature (B) on the site collection level. Just a few lines of code...

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top