This post is migrated from previous hosting provider. There are still some issues with old posts. Please make a comment on this post with any issues.

5 files you should know in the SharePoint 12-hive

Tags: SharePoint

The SharePoint 12-hive contains by default a number of interesting files that every developer should be aware of. The more you know the better you understand the inside of SharePoint and it allows you to create more efficient and better solutions.

Here are my top five favorite files:

ctypeswss.xml (in TEMPLATE\FEATURES\ctypes)

This is the feature elements file for all the default WSS Content Types. When creating new content types, most often I find it useful to derive them from existing content types. For example if I need to create a content type that derives from the standard content type Task, i can easily get the content type ID, which is used when creating new content type IDs, and what Site Columns that content type has.

fieldwss.xml (in TEMPLATE\FEATURES\fields)

Second favorite is the elements file for the WSS Site Columns feature. In this file all definitions for the default WSS Site Columns is found. Together with ctypeswss.xml this is really handy when creating custom content types. By finding out the ID’s of the Site Columns you can easily re-use the site columns when creating content types.

Custom List schema.xml in (TEMPLATE\FEATURES\CustomList\CustList)

Whenever I need to create a list definition and need to create a schema.xml I use the schema.xml for the Custom List feature and copy it to my definition.

STS onet.xml in (TEMPLATE\SiteTemplates\STS\Xml)

This is the file to check out when creating Site Definitions. The onet.xml file contains all Site Definitions (althought the folder is called SiteTemplates), which includes navigation, lists etc. Most often I copy this file (and all other files in the STS folder) and remove almost everything except the the blank site def.


Perhaps not that interesting that the four above, but on nearly all installations you update this file with the PDF icon (at least). What this file does it that it allows you to map an extension (or ProgID) to an icon and optionally specify an editor.

What’s your favorite ones?

No Comments

  • Wictor said

    Yup, that one was just outside my list. I did switch that one for docicon.xml, which I thought should be on the list due to the fact that I've repeatedly used it at customers installations. I've received such good responses that there should be a revisited post somewhere in the future.

  • Oskar Austegard said

    CustList is MUCH more complex than it needs to be - start with this schema instead: In fact - let me try to paste it here in its entirety - hope your comments escape angle brackets... <?xml version="1.0" encoding="utf-8"?> <list xmlns:ows="Microsoft SharePoint" id="{AB426CDE-98F2-432A-B296-880C7931DEF3}" title="Setting" url="Lists/Setting" basetype="0" foldercreation="FALSE" disableattachments="TRUE" versioningenabled="FALSE" direction="$Resources:Direction;" xmlns=""> <metadata> <fields> <field type="Text" name="Title" displayname="Name" required="TRUE"></field> <field type="Text" name="Value" displayname="Value" required="TRUE"></field> </fields> <views> <view baseviewid="0" type="HTML" webpartzoneid="Main" displayname="All Items" defaultview="TRUE" mobileview="True" mobiledefaultview="False" setuppath="pages\viewpage.aspx" imageurl="/_layouts/images/issues.png" url="AllItems.aspx"> <viewstyle id="17"></viewstyle> <rowlimit paged="TRUE">100</rowlimit> <toolbar type="Standard"></toolbar> <viewfields> <fieldref name="Edit"></fieldref> <fieldref name="Title"></fieldref> <fieldref name="Value"></fieldref> </viewfields> <query> <orderby> <fieldref name="Title"></fieldref> </orderby> </query> </view> </views> <forms> <form type="DisplayForm" url="DispForm.aspx" setuppath="pages\form.aspx" webpartzoneid="Main"> <form type="EditForm" url="EditForm.aspx" setuppath="pages\form.aspx" webpartzoneid="Main"> <form type="NewForm" url="NewForm.aspx" setuppath="pages\form.aspx" webpartzoneid="Main"> </forms> <defaultdescription>Settings used in the application.</defaultdescription> </metadata> </list>

Comments have been disabled for this content.

About Wictor...

Wictor Wilén is the Nordic Digital Workplace Lead working at Avanade. Wictor has achieved the Microsoft Certified Architect (MCA) - SharePoint 2010, Microsoft Certified Solutions Master (MCSM) - SharePoint  and Microsoft Certified Master (MCM) - SharePoint 2010 certifications. He has also been awarded Microsoft Most Valuable Professional (MVP) for seven consecutive years.

And a word from our sponsors...