views:

2039

answers:

2

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.

+2  A: 

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);
}
LeonZandman
Thanks for the code snippit, unfortunatly none of the feature ID's match on either my development environment or the production server, there are infact only 31 features on Dev 33 on production does that ring true?
Richard Slater
So you've searched the 12-hive for any occurrence of the feature ID and didn't find anything? Are you sure you used Grep the right way? The normal (UNIX) Grep uses the "-R" parameter instead of "-S" to do a recursive search.
LeonZandman
You might try to uninstall the feature by issueing a "stsadm -o uninstallfeature -id cdca545a-333a-4b3f-ba15-ac3cdbb12312 -force"
LeonZandman
A: 

Hi,

I'm not sure, but the problem could be related to the list instance feature.

In the element manifest of the feature you can define the attribute "FeatureId" which have to point to the feature which contains the list definition to use when the list instance is created.

So here a two possible sources of error.

  1. If this FeatureId isn't defined, the feature assumes that the list definition is defined within the same feature (list instance feature). If you have two separated features for the definition and the instance this might lead to this error.

  2. As I already said the FeatureId has to be the GUID of the feature defining the list definition to use. Perhaps you replaced this GUID with a newly generated one, assuming that this not the FeatureId of the list definition feautre, but the identifier for the list instance itself when it is created within MOSS.

I never had this problem myself, so I could only guess what the reason for your error might be.

Perhaps this blog entry might help you on your further investigations.

Flo