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 have issue during deployment. It throws:

Failed to load reciever assembly

I tried to GAC that assembly, also microsoft.office.sharepoint.clientextensions.dll and Microsoft.Office.Server.dll are in the GAC. My feature looks like this:

<Feature Id="09a18ff3-60d7-40bc-b5cf-457a7982ce1c" 
xmlns="http://schemas.microsoft.com/sharepoint/" 
ReceiverAssembly="FeatureBuilder" 
ReceiverClass="FeatureBuilder.FeatureReciever" 
Scope="Web"></Feature>

This is the error:

Error occurred in deployment step 'Add Solution': Failed to load receiver assembly "FeatureBuilder" for feature "Ace.EH.Web_MainFeature" (ID: 09a18ff3-60d7-40bc-b5cf-457a7982ce1c).: System.IO.FileNotFoundException: Could not load file or assembly 'FeatureBuilder' or one of its dependencies. The system cannot find the file specified.
File name: 'FeatureBuilder'
   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].'

Any ideas?

Thanks in advance.

share|improve this question
    
Could you please paste the code and more error information? –  Falak Mahmood May 16 '12 at 9:53
    
Post was edited to contain more details... –  Peter P May 16 '12 at 10:58
    
Is this the first feature youre attempting to deploy? Have you deployed others successfully? Could you confirm the feature is in the template folder of the 12 hive? –  1c1cle May 16 '12 at 13:10
    
This feature wasn't made by me ... but it was working, until I hang FeatureReciever ... returns error: Expression must evaluate to a node-set ... I tried to erase FeatureActivated() body but still same error => problem is on the way how I hang this event handler ... I'm quite confused where should I define eventhandler ... in xml? or where? ... and yeah this is my first contact with SharePoint feature ... =) –  Peter P May 16 '12 at 13:41

2 Answers 2

up vote 2 down vote accepted

The ReceiverAssembly should be the Fullname of the assembly

FeatureBuilder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx

If developing using SharePoint templages in Visual Studio 2010 use $SharePoint.Project.AssemblyFullName$

share|improve this answer
    
great, it helps, but now new problem occurs: Expression must evaluate to a node-set...'myModification.Path = "configuration/AplikaceRoly/"; myModification.Name = "add[@key='Sth'][@value='Eth']"; myModification.Sequence = 0; myModification.Owner = "NESS"; myModification.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode; myModification.Value = "<add key='sth' value='Sth'/>"service.WebConfigModifications.Add(myModification);' –  Peter P May 16 '12 at 11:57
    
any idea why? that that xpath is correct –  Peter P May 16 '12 at 12:00
    
Try removing the trailing / in Path and I'd also remove [@value='Eth'] from Name –  Per Jakobsen May 16 '12 at 12:08
    
Nope, still the same issue ... but I'm pretty not sure whether is this part of code called ...I'm quite lost in SharePoint =) I see SharePoint features 1st time ... I tried to debug it but without success ... btw. I bind feature reciever in feature.xml and also in feature file ... I guess it should be in related xml but somebody put all feature properties into SharePoint file ... so ... I'm not sure whether this error is related to event activating features ... –  Peter P May 16 '12 at 12:20

Use the -Force option with -globalassemblycache deployment

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.