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

This began when we noticed the health analyzer reporting the following:

[MissingAssembly] Assembly [ProjectSubsiteMaker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f8132574c3fbdd6f] is referenced in the database [WSS_Content_ITS_Site], but is not installed on the current farm. Please install any feature/solution which contains this assembly. One or more assemblies are referenced in the database [WSS_Content_ITS_Site], but are not installed on the current farm. Please install any feature or solution which contains these assemblies.

After some digging we found that the reference is in the EventReceivers table of the database. This event receiver was part of a custom solution that has been removed, and is associated with a list that no longer exists.

I have tried to find and remove this event receiver through powershell and through the sharepoint UI but it seems that without a list that it is attached to, the event receiver cannot be found. I could just delete the entry from the EventReceiver table in the database but I'm not sure if that would mess up some other reference.

How can we safely remove this event receiver from our database to stop the health analyzer from complaining about it?

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

Maybe "Event Handler Explorer" can remove them for you?

http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1547

The tool is originally for MOSS 2007, so I think you have to rebuild it with the 14 hive dlls to make it work with SharePoint 2010.

I wouldn't removed things directly from the database since it is unsupported.

share|improve this answer
    
Thank you for the link to the tool. It looks really useful for attaching and detaching existing assemblies but it doesn't seem to have the functionality to find and clean up a missing assembly. –  Nick Sarabyn Apr 13 '11 at 17:07
    
I ended up changing the HostId of the event receiver to an existing list and was then able to use Event Handler Explorer to (hopefully) cleanly remove the event receiver. It is not showing up in health analyzer now at least. Thanks! –  Nick Sarabyn Apr 13 '11 at 17:29
add comment

Theres a Delete method on the event receiver collection on the list. Use that to remove the event receiver and update the list.

Example code in PowerShell here http://blogs.solidq.com/sharepoint/Post.aspx?ID=80&title=How%20to%20add%2Fdelete%20an%20event%20receiver%20to%20a%20single%20list%20with%20PowerShell%20in%20SharePoint%202010

share|improve this answer
    
powershell is good for administration –  djeeg Apr 13 '11 at 21:37
1  
powershell is good. Period :) –  Anders Rask Apr 13 '11 at 21:47
add comment

SharePoint Manager ( http://spm.codeplex.com/ ) will also allow you to remove event receivers.

share|improve this answer
add comment

We can delete using code see this link: http://www.anmolrehan-sharepointconsultant.com/2011/12/delete-orphaned-event-handler-using.html

share|improve this answer
1  
Welcome to SharePoint! While this post may answer the question, we prefer more details such as "why". Please edit your post with additional details. See How to Answer for general guidelines. –  Kit Menke Dec 12 '11 at 15:13
add comment

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.