I spend some time over the last weeks reverse engineering Windows SharePoint Services 3.0 Tools: Visual Studio 2008 Extensions, Version 1.2 and with the help of a few bloggers who really did much of the investigations I just validated them. I’ll allude to these as we develop the site definition.
In WSPBuilder when creating a project the tool behind the scenes parses the 12 hive and creates entries in a solution manifest file corresponding to these entries. I won’t go into the details and they aren’t needed just use the tool and thank the developers for the effort, just understand that solution development was much harder before these tools were developed!
Let’s get started:
1. Create a new WSP Project:

2. The VS 2008 WSPBuilder Start:

3. Create the 12 hive folders you’ll need:
a. Template
i. 1033
ii. Features
iii. Images
iv. Layouts
v. SiteTemplates
vi. XML

Site Definition
The site definition I am going to create is based upon a custom team site developed in the UI. I am going to go through the process of the site definition development in WSPBuilder. Here is a screen shot of the proposed site definition:

What we have is 5 lists of which two are custom with views. The onet.xml file will have no custom navigation and the default.aspx page will have some custom list views on the page. (Caveat: We could build this site definition in its entirety with the SharePoint Solution generator 2008! We are not going to so I can demonstrate how to create a complete site definition thus useable on other site definition types!)
1. Lets add the fragments we will need to do a site definition:
a. Create a webtempABCTeamSite.xml file under the 1033 folder: Subfolder XML


2. Copy the following fragment into this file:
<?xml version="1.0" encoding="utf-8"?>
<Templates>
<Template Name="ABCTeamSite" ID="10002">
<Configuration
ID="0"
Title="ABCTeamSite"
Description="ABC Team Site"
Hidden="FALSE"
ImageUrl="/_layouts/images/ABCTeamSite/ABCTeamSite.png"
DisplayCategory="ABCCustom" />
</Template>
</Templates>
3. Create a folder beneath the images folder: ABCTeamsite and add an image of what the site will look like:

4. Copy the Team Site (STS) folder into the siteTemplates folder and rename it to ABCTeamSite

5. Get rid of defaultdws.aspx
6. Develop custom lists using the UI
a. If using content types develop the content type feature using the UI
i. Use MOSS Feature Generator MFG (CodePlex: http://www.codeplex.com/mossfeaturegenerator)
1. To generate the content type feature files
2. I don’t use MFG for List Definitions as I found some fidelity problems!
b. Use SharePoint solution Generator 2008 to develop the custom list definitions
