Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

WSP for Site Definition does not show up when creating a new site. I uploaded a new wsp under the solution gallery of the site collection. I went to a sub site and click on Create from "all content" and I dont see the site def (wsp) that I uploaded and activated in the solution gallery.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

In addition to your site template (onet.xml), you need either to add webtemp*.xml file or to include WebTemplate element in your solution.

WebTemplate element (recommended)

WebTemplate elements are added starting from SharePoint 2010. You can use features to add them to your portal, and this is the only approach which is avaliable for sandboxed solutions. Farm solutions can use WebTemplate elements too, of course.

Awesome article from Stefan Stanev about this:

WebTemp*.xml

Farm solutions can use webtemp*.xml files for the same purpose. Actually, it is an old way to provision information for your web template (inherited from SharePoint 2007), so I don't recommend you to use it.

This file should be placed to {14 hive}\TEMPLATE\{LCID}\XML\ folder, where {LCID} is your locale ID, for example, 1033.

This could be achieved with SharePoint Mapped Folder.

File should contain XML code, for example:

<Template Name="ContosoBase" ID="10001">
    <Configuration ID="0" Title="Contoso Basic Site" Hidden="FALSE"
ImageUrl="/_layouts/images/contosoprev.png" Description="This template provides a standard site configuration
for basic Contoso sites." DisplayCategory="Collaboration"> 
    </Configuration>
</Template>

Additional MSDN articles:

share|improve this answer
    
wow. thanks for posting in details. I sure appreciate it. It helps. –  Roxanne May 4 '11 at 13:38

Site definitions can not be deployed as sandboxed solutions. You must use a farm solution. If you built your wsp in Visual Studio, you need to change the Sandboxed Solution property of your project to False.

share|improve this answer
    
it is set to False –  Roxanne May 3 '11 at 16:11
1  
A farm solution is not deployed to the solution gallery; that is only for sandboxed solutions. Farm solutions require Add-SPSolution/Install-SPSolution. If you are deploying through Visual Studio, look at the Ouput window to see what actions are being done for you. Depending on your deployment configuration in VS, you may need to activate your feature after the wsp is deployed. –  Laurie May 3 '11 at 16:33
    
Let me correct my previous comment. Your Site Definition in Visual Studio is probably just a mapped folder to your onet.xml file and webtemp*.xml file. There is no feature to activate. –  Laurie May 3 '11 at 20:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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