sharepoint extract portable schema.xml from custom list on site

0

I've created a custom list in a SharePoint site, but now I want to convert that into a list template so I can deploy it in other sites using a feature.

I've tried two methods:

  1. Use SharePoint Manager 2007 to copy/paste list schema into schema.xml and roll into a feature
  2. use stsadm extensions along the same lines

This hasn't worked well for me. I've been fighting this all day, and I get a variety of errors, from "Can't compile XML", to "Can't find feature XML", to "unknown error HRESULT: 0x80020009".

Are there any tools or straight-forward methods out there for doing such a thing, or am I more-or-less relegated to creating a custom Schema.xml by hand? Or, alternatively, are there any good tools just for generating list templates?

sharepoint
templates
asked on Stack Overflow Nov 17, 2010 by Ben Collins

1 Answer

0

SharePoint Solution Generator (part of VSeWSS) usually works fairly well.

Creating a custom schema.xml isn't as hard as you might think from looking at the generated code - it turns out that almost everything in there is default values. You have to know a couple of magic numbers (14 for viewstyle and 0 for baseview if you want to be able to add a new view) but they end up being a lot more maintainable than the generated versions.

There is also the option of creating a list in code using a feature reciever - in a lot of cases this ends up being easier than dealing with SharePoint's "easy" process.

answered on Stack Overflow Nov 18, 2010 by Tom Clarkson

User contributions licensed under CC BY-SA 3.0