I have the XML schema information (SPContentType.SchemaXml) of a content type. I am looking for a method that takes this information to recreate the content type at a different location?

Thank you.

PS: The closest that I came to finding this solution is described here (http://www.sharepoint4developers.net/en-nz/post/creating-content-types-programmatically.aspx), but when I tried to use this solution, certain attributes were missing in the resulting SPContentType (e.g. Description).

  • Please don't crosspost questions between sites. All this really achieves is duplicate information. Can you choose one site to ask this question on? If you don't receive the information you need, you can delete the question and then re-ask it on the other site.
    – Kit Menke
    Commented Aug 2, 2011 at 21:31
  • Kit, I did not know about this site when I posted on stackoverflow. And when I did find out about this site, I promptly copied over my question here. I have deleted the old post from stackoverflow. It was not in my intention to crosspost. You, on the other hand, are doing a good job; keep it up. And while you are at it, see if you can answer my question :) Thank you again.
    – Tom
    Commented Aug 3, 2011 at 4:36
  • Great! Thanks for following up and welcome to the site. :)
    – Kit Menke
    Commented Aug 3, 2011 at 13:52

1 Answer 1


From your queston or tags i cannot determine if you are using SharePoint 2010 or 2007.

The approach specified with reflection in the link you provide is only relevant in SP2007. In SP2010 content types can be created programmatically from scratch, since we have a constructor. Another approach is to use your manifest xml to create your CT declaratively.

For more info see this MSDN article.

EDIT: corrected link

  • Anders, Thank you for your reply. I believe the msdn article url is different from what you intended to post. Could you please check. Thank you again!
    – Tom
    Commented Aug 9, 2011 at 19:21
  • Sorry fixed now! (damn iPad!;) Commented Aug 9, 2011 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.