Upgrading Standard List Definitions

Applies to: SharePoint Foundation 2010

In Windows SharePoint Services 3.0, list definitions were moved into Features to make them more easily accessible from site definitions. For this reason, you no longer need to redefine lists that you do not intend to customize within your site definition.

Note

In Microsoft SharePoint Foundation 2010, you should not need to modify a custom list definition that is already a Feature, which is one of the safest customizations to upgrade. However, if a list definition involves, for example, a custom user interface (UI), custom views, or references to uncustomized files, then after upgrade you should verify page rendering in both the UI mode of the previous version, and the UI mode of the current version. You should verify pages whenever you revert pages or site definitions to their original uncustomized status.

If you have not customized any standard list definitions of the previous version, simply remove the standard list definitions from your site definition and replace them with a reference to the standard SharePoint Foundation team collaboration Feature.

To remove the standard list definitions from your site definition

  1. If present in Onet.xml of the previous version, remove the <ListTemplate> tags for the following list types:

    • custlist

    • gridlist

    • doclib

    • imglib

    • voting

    • discuss

    • favorite

    • announce

    • contacts

    • events

    • tasks

    • xmlform

    • issue

  2. Also, depending on the previous version, you may need to remove the supporting list directories for these old list definitions. That is, for your current site definition, you can remove the ANNOUNCE, CONTACTS, CUSTLIST, DISCUSS, DOCLIB, EVENTS, FAVORITE, GRIDLIST, IMGLIB, ISSUE, TASKS, VOTING, and XMLFORM folders from \LISTS directory.

  3. In each of the <Configuration> tags within your Onet.xml file, add a reference to the team collaboration Feature, as follows.

    <Configuration ...>
      <WebFeatures>
        <!-- TeamCollab Feature -->
        <Feature ID="00BFEA71-4EA5-48D4-A4AD-7EA5C011ABE5" />
      </WebFeatures>
    </Configuration>
    

If you have customized specific list definitions (for example, the document library definition [DOCLIB]), then you must use a more itemized approach. Replace all uncustomized lists as mentioned above (in this case, all lists except DOCLIB). Rather than adding a reference to the team collaboration Feature in your <Configuration> tags, add specific references to the Features that contain list definitions that you have not customized. Table 1 shows the Feature folder names and Feature IDs of list definitions.

Table 1. Feature folder names and Feature IDs of list definitions

Folder

ID

AnnouncementsList

00BFEA71-D1CE-42de-9C63-A44004CE0104

ContactsList

00BFEA71-7E6D-4186-9BA8-C047AC750105

CustomList

00BFEA71-DE22-43B2-A848-C05709900100

DataSourceLibrary

00BFEA71-F381-423D-B9D1-DA7A54C50110

DiscussionsList

00BFEA71-6A49-43FA-B535-D15C05500108

DocumentLibrary

00BFEA71-E717-4E80-AA17-D0C71B360101

EventsList

00BFEA71-EC85-4903-972D-EBE475780106

GanttTasksList

00BFEA71-513D-4CA0-96C2-6A47775C0119

GridList

00BFEA71-3A1D-41D3-A0EE-651D11570120

IssuesList

00BFEA71-5932-4F9C-AD71-1557E5751100

LinksList

00BFEA71-2062-426C-90BF-714C59600103

NoCodeWorkflowLibrary

00BFEA71-F600-43F6-A895-40C0DE7B0117

PictureLibrary

00BFEA71-52D4-45B3-B544-B1C71B620109

SurveysList

00BFEA71-EB8A-40B1-80C7-506BE7590102

TasksList

00BFEA71-A83E-497E-9BA0-7A5C597D0107

WebPageLibrary

00BFEA71-C796-4402-9F2F-0EB9A6E71B18

WorkflowProcessLibrary

00BFEA71-2D77-4A75-9FCA-76516689E21A

WorkflowHistoryList

00BFEA71-4EA5-48D4-A4AD-305CF7030140

XmlFormLibrary

00BFEA71-1E1D-4562-B56A-F05371BB0115

If you have only customized the document library (DOCLIB) list definition in your old site definition, do not include a reference for this list definition within the <Configuration> tags of your Onet.xml file. Add Feature references that are scoped to a site collection or Web site level for every Feature except this document library list definition so that it maintains your customizations.

Adding New Forms, Content Types, and Shared Fields

Consider making a few more changes to each of your customized list definitions from the previous release to make them work in the current release of SharePoint Foundation.

All SharePoint form and list view pages now use standardized ASPX pages. Rather than each page having, for example, its own AllItems.aspx, EditForm.aspx, DisplayForm.aspx, or NewForm.aspx file, the pages now share by default a standard ASPX file. To use these standardized form pages, specify SetupPath="pages\form.aspx" in all the <Form> tags of your Windows SharePoint Services 2.0 list definitions, and specify SetupPath="pages\viewpage.aspx" in views that have pages behind them. Of course, if you customized pages for specific lists, you can continue to use them, although you must follow the guidance provided previously about upgrading .ASPX pages for use in SharePoint Foundation.

List forms now use Microsoft ASP.NET user control-based templates rather than Collaborative Application Markup Language (CAML). The CAML form definition is no longer necessary and can therefore be removed. If you wish to use a custom template for your list definition, specify Template="TEMPLATENAME" in the <Form> tag of your Schema.xml file. For more information about custom form templates, see Creating Custom Form Templates.

Consider adapting customized list definitions to use content types and shared field definitions. To do this, define new content types and shared fields in a separate Feature scoped to the site collection.. To upgrade your list definition, use the <ContentTypes> tag to declare which content types to implement in lists created through the definition, and annotate <Field> tags by specifying the GUIDs that identify shared fields that they must use. Note, however, that even if you use content types, your list definitions still must declare all fields that are included in the Schema.xml file of the list Feature.

See Also

Concepts

Upgrading a Custom Site Definition

Other Resources

Upgrading SharePoint Foundation