Where should I "bind" content types to my list?

I need to bind two different custom content types. I tried to do it in the list definition but the changes did not take affect. Doing it next to the list instance did work, but would not work if i create a new list throe the web user interface.

Next to list instance

<ContentTypeBinding ContentTypeId="" ListUrl="">

Worked, but only for the created by the CAML definition.

Inside the list template

      <ContentTypeRef ID=""/>

This did not work. Anything special to think of here?

Add them through an Event receiver

One method I came to my mind, that I haven't tried yet, is to add the content types whit an event receiver when creating the list? It should work but feels more complicated than using CAML.

2 Answers 2


The correct place is the list template (schema.xml). But you have to repeat the FileRef inside the ContentTypeRef element from the content type definition and also copy all the fields to the Fields section in the schema.xml. Then to get the list created properly you must create a new list instance after you have deployed the updated list schema.

Unfortunately you cannot simply link the list definition to a content type.

Here is a stripped down example:

      <ContentType ID="0x0100..." Name="...">
          <FieldRef ID="{993DAADB-918B-4AA1-89F4-34F0B57FD058}" Name="Some Field" />
      <Field ID="{993DAADB-918B-4AA1-89F4-34F0B57FD058}" Name="Some Field" />
  • I tried very similar approaches and also this I think, but none worked. What you are doing above, is it not so that you actually define a new content type, and not refer to an old one? Do you know if your approach works for adding two content types also? Thanks for helping!
    – Tim
    Commented Sep 14, 2011 at 8:01
  • No this does not create a new content type. The 'issue' with SharePoint is that you must have a copy of the content type in the list definition. This is counter intuitive but unfortunately the way it works. If you are working with SharePoint 2010 the best way is to create the content type, deploy it and than add a list definition based on the content type. Visual Studio will generate the list definition for you and it will look like the above example. Are you re-creating the list each time after deploying changes to the list definition? Commented Sep 14, 2011 at 9:19
  • The way I developed back then when I wrote this question made it hard for this method to work, supposedly because each deployment wasn't made to a "clean" environment which left much old and similar content that messed up the new content. This is why It did not help me back then, but I think the method described in your answer would have worked.
    – Tim
    Commented Sep 17, 2012 at 8:12

I typically use the ContentTypeBinding Element, then progammatically re-order the content types such that my 'bound' one is the new default.

  • I've used this method and found it very reliable. When I read it here from your description I did not understand it completely but once I read through the SharePoint Guidance material and reviewed the source code I finally got it, because they use this method there to.
    – Tim
    Commented Sep 17, 2012 at 8:04

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.