The easiest way to create a Sharepoint list, is by clicking it together in Sharepoint. The hardest way is to create yout own schema.xml.

Wat if you can create the list in Sharepoint and export this list to a schema file? Well, there is a stsadm command created by Imtech which allows you to make this export. When you install the wsp file to your Sharepoint solution, an extra stsadm command is available. The syntax to use is as following:

stsadm.exe -o ocdexportlist  -url <url of the site content> -name <list name> -dir <export location>

By default "OCDExportList" exports list with all views, like "AllItems.aspx" and etc, but actually in 90% cases you need to use standard views, and don't deploy custom ones. So, to deploy list and use standard views the following changes of list schema xml should be applied
  1. Add SetupPath="pages\form.aspx" for each <Form> in <MetaData>/<Forms>
  2. Find <View> ulr="AllItems.asxp" and change attributes
  • add SetupPath="pages\viewpage.aspx"
  • change "DisplayName" value on "$Resources:core,objectiv_schema_mwsidcamlidC24;"