WSP already contains the site definition(ONET.XML)

Hi All,

I have noticed that it is prerequisite that site template can only be activated on a environment when the site definition that site template is based up, does exist. It make sense to me however if site template is saved a WSP and later opened in Winzip then we can see that WSP do contain the ONET.XML. while Site template is already have the site definition then why it is prerequisite to install the base site definition before activating the site template.

Regards Amit

November 15th, 2012 1:26pm

The ONET.xml found in a Site Template WSP is not complete and contains only the delta between the base site definition and the actual site. While creating a site from this template, SP uses the base site definition to plug in the components, activate features etc as defined in the file after creating the site.

<!--Module Feature-->
<Feature ID="{5777a991-5875-40c1-9ed1-80b55a56a029}" Name="Module Feature">
<Properties>
<Property Key="GeneratedBySaveAsTemplate" Value="1" />
</Properties>
</Feature>

<!--Web Workflow Feature-->
<Feature ID="{eca0e8a6-c30a-44f1-b762-a94b5d8e8fc3}" Name="Web Workflow Feature">
<Properties>
<Property Key="GeneratedBySaveAsTemplate" Value="1" />
</Properties>
</Feature>

<!--Property Bag Feature-->
<Feature ID="{b0d3d451-c797-4f73-aee7-d806dcbafa23}" Name="Property Bag Feature">
<Properties>
<Property Key="GeneratedBySaveAsTemplate" Value="1" />
</Properties>
</Feature>

Free Windows Admin Tool Kit Click here and download it now
November 15th, 2012 9:52pm

Hi Guru,

You are saying that this ONET.xml only contains all the features that are activated in site template. it make sense. thanks for reply.

Regards Amit

November 16th, 2012 2:42am

I was browsing through google to find the solution and found this article..

Glad it works!! Thanks for your help Guru :)


  • Edited by lala_601 5 hours 31 minutes ago
Free Windows Admin Tool Kit Click here and download it now
June 29th, 2015 10:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics