Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am receving the following error message in the ULS logs

The type 'MyHeaderField,$Sharepoint.Project.AssemblyFullName$' could not be deserialized. Exception: System.IO.FileNotFoundException: Could not load file or assembly '$Sharepoint.Project.AssemblyFullName$' or one of its dependencies. The system cannot find the file specified. File name: '$Sharepoint.Project.AssemblyFullName$' at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCraw...

The Xml file definiton is as follows

<?xml version="1.0" encoding="utf-8" ?>
<FieldTypes>
     <FieldType>
         <Field Name="TypeName">MyHeaderField</Field>
         <Field Name="ParentType">Text</Field>
         <Field Name="TypeDisplayName">HeaderField</Field>
         <Field Name="TypeShortDesription">Header for the page</Field>
         <Field Name="UserCreatable">TRUE</Field>
         <Field Name="ShowOnListCreate">TRUE</Field>
         <Field Name="ShowOnSurveyCreate">TRUE</Field>
         <Field Name="ShowOnDocumentLibraryCreate">TRUE</Field>
         <Field Name="ShowOnColumnTemplateCreate">TRUE</Field>
         <Field Name="FieldTypeClass">MyHeaderField,$SharePoint.Project.AssemblyFullName$</Field>
     </FieldType>
 </FieldTypes>

Can someone please help me out how to resolve this?

Thanks,

share|improve this question

1 Answer 1

Based on the error you posted, it would seem that the deployed file still contains the token "$SharePoint.Project.AssemblyFullName$" in place of the actual assembly name in the element file. As soon as SharePoint tries to "parse" the file it will then error on the assembly name: the fusion binder is actually searching for a dll called "$SharePoint.Project.AssemblyFullName$", and it is only normal that it won't find it.

AFAIK normally Visual Studio should resolve the token and replace it when it builds the solution package. In this case it isn't doing that. I would check the solution for any issue that could prevent the token from begin resolved. Your problem is almost certainly caused by the field CAML definition file on the server containing the unresolved token.

A special note if you are using CKSDev & the "copy to SharePoint" feature: there is a bug in the feature when copying files that use tokens - sometime the tokens are not replaced. Could that be your case? Or are you manually copying files to the 12/14/... folder?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.