VSeWSS Service Error: Feature ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’ could not be installed because the loading of event receiver assembly “….” failed
While working on a SharePoint solution, I was plagued by intermitant problems where the solution failed to deploy because of not being able to locate an Assembly. Looking at the VSeWSS1.3.log file the following entry was present:
Microsoft.SharePoint.Tools.Utilities.VSeWSSServiceException Microsoft.SharePoint.Tools.Utilities.VSeWSSServiceException: VSeWSS Service Error: Feature 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' could not be installed because the loading of event receiver assembly "..." failed: System.IO.FileNotFoundException: Could not load file or assembly '....' or one of its dependencies. The system cannot find the file specified. File name: '....' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) 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()
When I checked the GAC this Assembly was there and when looking at the solution Manifest.xml there was an entry for the ‘missing’ Assembly.
In the solution I had a list definition that was to be bound to a feature activated event. After numerous attempts and poking around in the files I found that an entry had appeared in the content type Feature.xml file that the list defintion was based on trying to bind that Content Type feature to a feature activated event. After removing the offending ‘RecieverAssembly’ and ‘RecieverClass’ attributes the solution deployed fine.
In short, the message from VSeWSS was not clear. It complained that the Assembly was missing but what was actually the problem was that a Content Type was linked to a feature reciever that it shouldn’t have been! I still don’t know how the content type got bound to a feature activated event though….
