WSSStore Base Solution Structure

In the previous post I introduced the tools I’m using to create the new Real Nice Rugs site. I also talked about the version control and introduced the Visual Studio 2008 solution containing the project’s base site definition. In this post I’m going talk about the solution package itself.

You can download the version that goes with this post here.

Project Structure

This project uses WSPBuilder to create web solution packages. WSPBuilder works by examining the project’s folder structure and creating a cabinet file containing a solution manifest and all of the project’s files. The manifest tells SharePoint where to put each file from the cabinet into the 12 hive.

The folder structure looks like this:


A Web Template file is an xml file that advertises the presence of a site definition to SharePoint. The web templates on your server are in the 12TEMPLATE1033XML folder (1033 is my LCID, it indicates EN-US, but yours may differ). The name of each web template starts with the literal text, WEBTEMP. The web template for this solution is WEBTEMPWSSSTORE.XML. I created this file using the existing WEBTEMP.XML from my development server’s 12 hive as a starting point.


<!– _lcid="1033" _version="12.0.4518" _dal="1" –>

<!– _LocalBinding –>

xmlns:ows="Microsoft SharePoint">



Title="WSS Store"



Description="A simple eCommerce site."

DisplayCategory="Capitalism" >




SharePoint uses this information on the Create Site Collection page.

This particular web template points to two other sections of the 12 hive: the images folder and the site template.

12TEMPLATEImages – RNRImage.png

The 12TEMPLATEImages folder maps to the /_layouts/images/ URI on every site collection. The project contains the single image, RNRImage.png, indicated by the ImageUrl attribute.

12TEMPLATESiteTemplatesRNR – Default.aspx

SharePoint uses the value of the webtemp’s Template element Name attribute. The Name attribute in the template is RNR.

This folder contains the default web part page, default.aspx. In this example, the file is a copy of the STS (Team Site) default.aspx file.


The web template indicates that there is a site template named RNR. SharePoint looks for the site template file in the site template’s XML folder. The site template definition is always named ONET.XML.

You can see the ONET.XML for this version of the site definition here. I will fully describe this file and how I made it in a subsequent post.

The other two files in the project, FullDeployBuildEvent.txt and UpgradeBuildEvent.txt, are outside of the 12 hive structure. WSPBuilder will not include them in the package. These contain different post-build event command scripts that build and deploy the solution.