6
votes

As described in the title I'm just trying to find out where SharePoint 2010 stores the elements.xml and schema.xml files for custom content types and list definitions if anyone could help please.

What I'd like to do is rather design my custom content type and list in the SharePoint GUI in the browser and then go and extract the SharePoint generated files in order to use in a solution built in Visual Studio instead of coding everything manually from scratch.

Hope that makes sense! Thanks!

3

3 Answers

10
votes

You will not find them stored on your hard disk but rather in your Content_DB.

If you need to access them to grab the schema, you could use SharePoint Manager 2010, and navigate to your content type from it and copy the Schema Xml tab.

enter image description here

2
votes

Here "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES"

For example, "Contact List Template" located at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\ContactsList"

2
votes

Mhd. Yasseen was correct. The default built-in templates from Microsoft are in the 14 hive but anything custom by the user is stored in the Content Database for that web application. Another common approach you may look for is to save the site as a template, and then create a SharePoint project based on that WSP. This means everything is already setup for you, and you only need to delete the things you don't want from the site.