List Schema.xml Weirdness With Content Types

So I was helping another consultant fix some odd behavior he was experiencing when editing the XSL of a List View in SharePoint 2010. After we started digging we noticed we couldn’t even change the names of columns or delete them using the UI. This list was being generated from a solution that had a list schema, content type schema and list instance. The schema was built using the Visual Studio 2010 wizard for list from existing content type.

So when we started digging we noticed that the list schema that was being generated had a content type definition with the same GUID as the content type schema. Instead of using the ContentTypeRef. So once we removed the ContentType and went to ContentTypeRef everything worked great. One of those hard to figure out gotcha’s, and one that I wouldn’t expect SharePoint to allow.

Example of the issue:

Fix listed first referencing the ID of the content type to have in the list followed by an example of what visual studio was doing.