I just created a couple of site columns and content types that reference them through VS2010. I updated one of the fields and then tried to redeploy, but after retracting, deploy failed because the site columns previously created were still there. I tried to delete them manually from the UI, and got an alert box with this message:
Site columns which are included in content types cannot be deleted. Remove all references to this site column prior to deleting it.
I dug around in SharePoint Manager and didn't find any references, so I used powershell to enumerate all the content types and lists looking for references to my site columns and found nothing.
I tried to delete using PowerShell like this:
$web.Fields.Delete("StartTime")
which resulted in this error:
Exception calling "Delete" with "1" argument(s): "Site columns which are included in content types or on lists cannot be deleted. Please remove all instances of this site column prior to deleting it." At line:1 char:19 + $web.Fields.Delete <<<< ("StartTime") + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException
Finally, a simple inspection of the columns in PowerShell shows the following:
Title Id CanBeDeleted ParentList Sealed ListsFieldUsedIn
----- -- ------------ ---------- ------ ----------------
Start Time OBE 6fa0d85b-9af1-408b-835f-d4c66536... True False {}
Time Tracker Tags 92bc866b-0415-45f0-b431-d4df69c4... True False {}
I'm experienced with MOSS 2007 and new to SP2010, but I've never seen this happen before. Anyone have any hints?