C# – Failed to determine definition for Feature with ID… – unknown GUID

csharepointsharepoint-2007web-parts

I am in the process of developing a Feature to install a WebPart with associated List and List Instance. On deployment of the list the following message is logged:

Failed to determine definition for Feature with ID
'cdca545a-333a-4b3f-ba15-ac3cdbb12312'.
Skipping this feature for element querying consideration. 

(line breaks added for clarity)

I have read articles on various blogs that suggest searching through the Features to identify the offending feature. To search through the Sharepoint 12 directory I have downloaded a version of grep that supports searching subdirectories, however the following command failed to find any matches on either my Development VM or the Live server:

grep -S cdca545a-333a-4b3f-ba15-ac3cdbb12312 <path to \12\>

Nor does:

grep -S -i cdca545a <path to \12\>

My development machine consists of Windows 2003 R2, Windows Sharepoint Service 3.0 SP1, Visual Studio 2008 with STSDev 2008.

At present the feature deploys but the list can not be instantiated, and I am trying to work through the log file noise to get to the root of the problem.

Best Answer

You could try enumerating the installed feature definitions on your SharePoint farm. Here's some sample code that prints the feature ID and display name for each installed feature:

SPFeatureDefinitionCollection featureDefinitions = SPFarm.Local.FeatureDefinitions;
foreach (SPFeatureDefinition featureDefinition in featureDefinitions)
{
    Console.WriteLine("{0}: {1}", featureDefinition.Id, featureDefinition.DisplayName);
}