Error loading and running event receiver Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver

event-receiversharepointworkflowworkflow-foundation

I have a custom SharePoint workflow attached to a custom ItemAdded event receiver that was working fine up until the last type I promoted it using WSPBuilder.

My code is very close to this example: http://www.codeproject.com/KB/sharepoint/MOSS_FolderContentTypeWF.aspx

I used WSPBuilder in the past but not for this project and it seems to have broken my workflow somehow.

My workflow doesn't start even though it should and when I look in the event logs I see the following error:

Error loading and running event
receiver
Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver
in Microsoft.SharePoint,
Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c.

Additional information is below.

: The object specified does not belong
to a list.

So I disabled my event handler and even removed it and the error still happens for this document library. The error isn't generated on other site's doc libraries. Did I break an event receiver in the guts of SharePoint?

Ideas?

Best Answer

Considering it was working fine, do you have the previous working copy in source control? If so try deploying that to see if the problem is rectified.

If this fixes it the problem lies within the Visual Studio project. You can then correct it by comparing the changes with some sort of diff tool such as WinMerge.

Update in response to answer/comment: A tool such as SharePoint Manager is a great visual way to see the "guts" of your SharePoint site. Use this to compare what you're expecting in SharePoint with what's actually there.

Related Topic