Tag Archives: sharepoint 2007

Using PowerShell to Convert SharePoint 2007 List Templates (STP) for SharePoint 2010

This method of converting SharePoint 2007 list templates for use in SharePoint 2010 is not supported by Microsoft. Use at your own risk. Your mileage may vary.

SharePoint 2007 List Templates in SharePoint 2010

I recently needed to move a number of list templates from SharePoint 2007 to SharePoint 2010. Unfortunately, SharePoint 2010 just doesn’t support this. The only supported method to move these lists across is to upgrade the whole content database. That just wasn’t an option for me, so I needed to find another way.

Luckily, I discovered an excellent blog post by Tom (Belgium) that describes a method for getting SharePoint 2007 list templates working in SharePoint 2010.

Tom’s basic method is:

  1. Extract the contents of the STP file (it’s really just a CAB file)
  2. Edit the manifest.xml file, changing the ProductVersion element from 3 to 4
  3. Repackage the STP file

I have had success with this method for both templates for lists and document libraries. Continue reading Using PowerShell to Convert SharePoint 2007 List Templates (STP) for SharePoint 2010

Adding a View When Provisioning a Custom List

When creating a custom list, you need to provide a list definition in the form of a schema.xml file. Rather than creating a schema.xml file from scratch, a recommended approach is to copy an existing list definition. The out-of-the-box SharePoint custom list is a good starting point as it provides the barest minimum of features required. Armed with a stock list definition, you need to modify it for the list you want to create. If you want to use a specific content type, you can specify it in the <ContentTypes> section. You need to specify the columns of the list in the <Fields> section. Finally, you will want to modify the view definition to specify the columns to be included in the view.

Modifying an existing list definition is a quick way to create a custom list. Often, however, you will want to have more control over the view definition other than what fields are included in it. The view definition is the largest section in the schema.xml and can be rather daunting. Here is where SharePoint Manager comes in. Continue reading Adding a View When Provisioning a Custom List