1

We have an existing Branding Solution Package (WSP) that contains multiple features for page layouts, list definitions, master pages etc..

Because of the number of files/features (dozens if not hundreds) I would like to create a separate solution package that only contains the Page Layouts Feature. Is this possible? (and advisable?)

We are on SharePoint 2013 (On-Prem)

0

Yes, you can split up your Features and then declare the Feature dependencies. Once this is done you wont be able to activate a Feature if the Feature(s) it depends on have not been activated.

How to: Add and Remove Feature Dependencies

  • Just to clarify I have Package1 which contains Features Feature1, Feature2, Feature3. I want to create Package2 which only contains Feature1 (same GUID). I'm wondering if I can deploy Package2 without removing Package1 – vandre Nov 8 '16 at 18:26
  • Sorry - I didn't realize that your question related to deployment. Do you want to have Feature1 in both Package1 and Package2? – Rob Windsor Nov 8 '16 at 19:30
  • That is correct, I would like to have the same feature in both packages – vandre Nov 8 '16 at 19:43
  • I think you could do it but you're going to have to fight hard against the Visual Studio tooling to make it work. If I was going to attempt this I would centralize all the code into a DLL and also have only one copy of any files used by the elements in the Feature and then link to those files in my Visual Studio project. – Rob Windsor Nov 8 '16 at 19:49
  • 1
    As an alternative I would advise that you split out Feature1 into a single Package and then declare Feature dependencies as appropriate in the original Package – Rob Windsor Nov 8 '16 at 19:51
0

I just had time to look at this again. The answer is yes, a feature can be part of multiple solution packages. I just created a new project and edited the package manifest with Package editor per this answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.