Geeks With Blogs
David Jacobus SharePoint Consultant

List Definitions Using SharePoint Solutions Generator 2008

1. Start SharePoint Solutions Generator

a. Create List Definition




b. The two custom lists are Internal Contact (Custom list) and Tasks (Custom View)

c. Hit defaults’ to finish

d. VS 2008 Solutions Generator will provide a link to the generated solution


2. Create two Feature folders in the WSPBuilder Solution

a. Tasks

b. InternalContacts


3. Copy the two folders created by the Solutions Generator into these folders


4. Notice the custom view in the tasks list definition

a. In addition, The ListDefinition.xml file.

b. We will use this to create the feature so:

i. Move this to the next folder up on both lists


5. Next we will create the feature files

a. Add a new xml file to the feature folder on both lists


b. Copy the following xml into the file:

<?xml version="1.0"?>

<Feature Id="{770CB6F9-FC52-4041-872E-83E9685B2F7A}"

Title="Internal Contacts"







<ElementManifest Location="ListDefinition.xml" />




c. Do the same for the Tasks list

d. Be sure to change the GUID on the list feature

e. The image should be the same but with a different number for each feature.

i. I use a small transparent gif of the company logo

ii. If I have 10 features I will have 10 images the same just numbered sequentially

iii. The reason is if someone deactivates a feature all the other features will show with a broken image if they all use the same image (Experience)

6. The List definition File will be the same that was created by the Solution generator



7. The real workhorse of the list definition is the schema.xml file and is beyond the scope of this blog entry!

8. Now we need to create list instance features for each list in the site:

a. 6 lists

i. Tasks

ii. Internal Contacts

iii. Calendar

iv. Links

v. Announcements

vi. Team Discussions

b. They will all be similar so a copy and paste would be appropriate

c. The custom lists instances will have their feature GUID exposed in their elements.xml file while list instance based upon built in list templates will reference the built in feature GUIDS.

d. Custom Lists (Tasks)

9. Built-in List (Announcements)



a. Notice the feature ID in the list instance reflects a built-in List feature ID: 0BFEA71-D1CE-42de-9C63-A44004CE0104

b. They are all the same until the last three digits in this case 104

10. Custom List Internal Contacts List template feature



a. Notice that the list instance points to the same feature as the list template

Posted on Monday, October 27, 2008 3:32 PM | Back to top

Comments on this post: SharePoint 2007 Site Definitions Part 3

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © David Jacobus | Powered by: