2

Sorry for the common error. I have checked old discussion and cannot find one same as mine. I hope someone here have encounter this before and tell me how to fix (or tell me no way to fix).

We are working on a SP2010 farm. There is an event receiver "xxx". It was deployed as farm solution and is listening on ListTemplateId="115". We no longer need it so we (a)deactivate the feature, (b) retract from farm solution, (c) remove from farm solution. After that everything is working fine.

After about 2 weeks, we patch the servers. After patch, event viewer shows Event manager error: Could not load file or assembly xxx ........... or one of its dependencies. The system cannot find the file specified. whenever the "list A" have new item added. Before the error, everything else is working fine.

May I know how should I troubleshoot it?

I found article talking about remove orphan receivers from a list or a content type. How about list template ID?

3
  • featureadmin.codeplex.com Commented Feb 20, 2017 at 10:35
  • @TiagoDuarte I use featureadmin and found 1 "ERROR READING FEATURE". After deactivate it the error still exist. I also use SharePoint manager 2010 to check and cannot find event receiver "xxx"
    – Mark L
    Commented Feb 21, 2017 at 2:56
  • I edited my question. I found the receiver is actually listening to all itemadded for listemplateid
    – Mark L
    Commented Feb 21, 2017 at 3:47

2 Answers 2

3

Whereas FeatureAdmin can help you with missing feature dependencies, you may need to recurse to other means to properly remove those unwanted event receiver references, that can be at many levels (content type, list, etc.)

I have used the below script in a similar scenario.

$receiverName = "ECDC.DMS.EventReceiver, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5c916188042d33bd"
$web = get-spweb $webUrl
write-host "parsing web" $webUrl

#look in web
$web.EventReceivers | where-object{$_.Assembly -eq $receiverName} | %{ write-host "found in web" }

#look in web cts
$web.ContentTypes | %{$_.EventReceivers} | where-object{$_.Assembly -eq $receiverName} | %{ write-host "found web cts" }

foreach($list in $web.Lists)
{
    #look in list
    $list.EventReceivers | where-object{$_.Assembly -eq $receiverName} | %{write-host "found in list"}

    #look in list cts
    $list | %{$_.ContentTypes} | %{$_.EventReceivers} | where-object{$_.Assembly -eq $receiverName} | %{write-host "found in list cts"}
}
0

Another 'manual' process to this (if you have the solution initially deployed on few sites), is to re add then install the custom solution.

Then go to all sites where the features was activated. Deactivate the features in the sites. After this you can now disable then remove the custom solution. The error would go away.

Used this approach to solve the same (exact) senerio you've indicated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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