SharePoint 2010 ListTemplate.Name cannot be translated

by fkollmann 6/16/2010 5:35:50 PM

The whole day I was hunting an error where SharePoint 2010 refused to create a list instance (both by XML declaration and by code). All I got was either “filename invalid … 0x81020030” (XMl declaration) or NullReferenceException (by code, having the other error as inner exception when debugging).

After digging around a little bit I came across the following log message:

06/16/2010 17:24:12.65     vssphost4.exe (0x1290)                      0x17D4    SharePoint Foundation             General                           72k9    High        Failed to retrieve the list schema for feature fb18e164-124b-4da0-96d0-a6404af4996c, list template 17346; expected to find it at: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\Common_ListNavigation\$Resources:common,ListNavigationListName;".   

Since I try to define constants in resource files, too. I simply stored the ListTemplate.Name attribute in a resource to ensure the name does not have to be changed in different places:

<ListTemplate
    Name="$Resources:common,ListNavigationListName;"
    Type="17346"
    BaseType="0"
    OnQuickLaunch="TRUE"
    SecurityBits="11"
    Sequence="410"
    DisplayName="ListNavigationListDefinition"
    Description="My List Definition"
    Image="/_layouts/images/itgen.png"/>

Unfortunately this is not supported :-/ .