I'm using a sandboxed solution from a 3rd party vendor which contains some site columns and a site content type.
I want to add this content type to my document library definition in CAML.
But when I add a reference to this content type in my schema.xml like this:

<List ... EnableContentTypes="TRUE">
   <ContentTypeRef ID="0x0101002EFF4F6709F446E5AD064DC20BBE6855" />
   <!--contenttypeid of content type from sandboxed solution-->
   <ContentTypeRef ID="0x0101" />
   <!--contenttypeid of Document-->

The content type is not added to my library when I create an instance of it. (I created this document library after the sandboxed solution was activated of course)
Even worse in fact, I receive the following error message:

A duplicate content type name "Document" was found.

I've got reasons to believe that this is due to the fact that SP somehow cannot find the sandboxed content type and thinks it's a child content type of Document. So it adds the Document content type twice to my list with this error message as a result.

I just don't understand why it is not adding the content type from the sandboxed solution?
After all I can see this content type in the site (collection) content types gallery and I am able to add the content type via the UI to the same document library without a reference to this "sandboxed" content type.

UPDATE: I've tried to only add the 3rd party vendors's content type to the document library definition and now only 1 "Document" content type is added.
Actually it creates a list content type called "Document" which inherits from the 3rd party vendor's site content type.
So the following List Content Type Information is displayed:

  • Name: Document
  • Description: Create a new Document
  • Parent: {3rd party vendor's site content type}

And the site columns from the site content type were copied over.
Unfortunately it doesn't update the list content type's name.

Please share any clues you might have...

1 Answer 1


It seems that list has its own internal content type or at the very least, its own set of fields, which is creating the problem. Try investigating the list with the SharePoint Manager 2007/2010.

The alternative approach could be to use ContentTypeBinding element to bind multiple ContentTypes.


ContentTypeBinding elements that are responsible for linking the multiple content types share a common parent i.e. 0x0101, which means ancestor of this type is the base Document content type.

  • I've tried what you suggested and edited my question. Btw: Why not add a parent and child content type to a document library? Imagine you have a specific content type, e.g. "Meeting Report" and a more general content type (Report) which can be used for all reports that aren't meeting reports. Nov 23, 2012 at 13:43
  • Could you please share the schema.xml that is creating the problem? Nov 23, 2012 at 15:11
  • I've uploaded the sample listdefinition, cf. schema.xml Nov 26, 2012 at 14:40
  • I have updated my response! Nov 26, 2012 at 22:43
  • It might be a solution, but nonetheless you'll have to add a listadded eventreceiver or featurereceiver to configure the remaining settings or views of your list/library. I also tried this in combination with the customschema attribute of a listinstance element, but without success. Dec 18, 2012 at 13:45

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.