The new SharePoint designers in Visual Studio 2012 are a great productivity booster, and it’s now much easier to create Site Columns, Content Types and List Definitions.
Today I came across some peculiar behaviour in the List [definition] designer when it came to configuring the lists Content Types.
I’d added a custom content type to the list and wanted to remove the default Item and Folder content types, but right clicking these content types in the designer showed a disabled “Delete” option;
If you edit the list definition schema.xml file, you can manually remove those ContentType references, and then re-entering the designer shows correctly.
<List xmlns:ows="Microsoft SharePoint" Title="Organisation Leaders" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/Organisation Leaders" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/" EnableContentTypes="TRUE"> <MetaData> <ContentTypes> <ContentType ID="0x0100C26D5A3749D6453F9CCC4E5A72419A57" Name="Organisation User" Group="Platinumdogs Custom Content Types" Description="A content type representing an organisation user." Inherits="TRUE" Version="0"> <FieldRefs> <FieldRef ID="{9A377E88-F39C-445E-B09C-BD91AE5B3766}" DisplayName="Organisation User" Required="TRUE" Name="pdogOrganisationUser" /> </FieldRefs> </ContentType> </ContentTypes> ... </MetaData> </List>
However, spending a few minutes scratching my head, I notice the little triangle next to a content type in the list designer;
Clicking this little McGafter, enables these default ContentTypes, allowing you to remove them using the designer, just right-click and choose Delete.
Along with new designers it also facilitate new templates with some new options to which one can easily deploy as well as test sharePoint sites. As far as I know content types are critical component through which inheritance is carried out through its id.
Thanks! This is exactly I’ve been looking for) Pulled out some hair trying to figure out why the Del menu is grayed out.