1

I am facing a problem in activating a solution (.WSP) which represents a site template inside my solution gallery. here is the full senario:-

  1. i create a site collection , and for this site collection i create a new master page /Sites/CS.
  2. now under this site collection i create a new subsite /sites/cs/subsiteA . but this new sub-site did not get the custom master page.
  3. so i went back to my site collection>>site settings>>master page>> and i chose to reset the master page for all the sub-sites.
  4. so now subsiteA got the new master page.
  5. i save subsiteA as template. and i create a new sub-site based on the template.

Now the problem is that the new sub-site will not get the custom master page also. now i search for this problem and i find this link which talks about similar problem :-

jeffreypaarhuis.com/2011/10/21/your-master-page-automatically-on-newly-created-subsites/

so i did the following steps:-

1.I download the site template (.wsp) from "Site Settings" >> "Solution Gallery".

2.using visual studio i import the wsp inside Visual Studio as per this link https://msdn.microsoft.com/en-us/library/ee231603.aspx#Anchor_3

3.then inside visual studio i modify the master page url inside the XML file from :-

> <Configuration ID="0" Name="Default"
> MasterUrl="_catalogs/masterpage/seatle.master" CustomMasterUrl=""
> ThemedCssFolderUrl="">

to

> <Configuration ID="0" Name="Default"
> MasterUrl="_catalogs/masterpage/Custom.master" CustomMasterUrl=""
> ThemedCssFolderUrl="">

4.then i build & publish the project inside visual studio, which created an updated WSP file representing the site template with the new master page URL.

5.then i went back to solution gallery, and i upload the updated WSP file inside the solution gallery.

6.but now the problem is that the "Activate" button is disabled, as follow:-

enter image description here

so i am unable to activate the template and use it in creating new sub-sites.. so now sure where is the problem ?

2

Inside Visual Studio, try to switch off assembly inclusion:

enter image description here

Then republish and re-upload template once again.

  • can you please adivce what will this option do ? – john Gu Dec 3 '16 at 10:09
  • by default VS generates dll library for your wsp, since you are using site template, dll is not required. With this option you can disable dll inclusion into your resulting wsp. And this dll inside wsp may prevent activation. – Sergei Sergeev Dec 3 '16 at 10:12
  • ok will try this option,, will post the results.. thanks – john Gu Dec 3 '16 at 10:33
  • correct setting this as false ,, allow me to activate the solutions.. thanks a lot – john Gu Dec 3 '16 at 11:02

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.