문제

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?

도움이 되었습니까?

해결책

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...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top