I have added a feature receiver code file to a web template in visual studio. When i deploy it i get the following error. If i delete the feature receiver it works fine.
I have tried cleaning the project, closing and reopening etc
Error occurred in deployment step 'Add Solution': Failed to load receiver assembly "TestTemplate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3ef454810a2094ff" for feature "Feature3" (ID: c70f48de-c5cf-43c9-b8ca-44bef68763e3).:
System.IO.FileNotFoundException: Could not load file or assembly 'TestTemplate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3ef454810a2094ff' or one of its dependencies. The system cannot find the file specified.
File name: 'TestTemplate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3ef454810a2094ff' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].