Recenlty i migrate a SharePoint 2007 list and imported that list into a SharePoint 2010 site using some stsadm extensions.
The list used to have an SPD Workflow, since SPD 2007 cant be migrared i recreate the workflow using SPD 2010. But I realize that every time the workflow was trigger it was fired twice.
After some test i review the list schema and found out that the list had reference to the Workflow event receivers for both SharePoint 2007 and SharePoint 2010.
To get rid of those extra refence i created an small powershell script:
$spWeb = Get-SPWeb -Identity http://mySP2010site/mySP2010SubSite/
$spList = $spWeb.Lists["MyList"]
$eventsCount = $spList.EventReceivers.Count
$assembly = “Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”
for ($i = 0; $i -lt $eventsCount; $i+=1)
{
write-host $spList.EventReceivers[$i].Assembly
if ($spList.EventReceivers[$i].Assembly -eq $assembly)
{
write-host “About to delete the reference”
$spList.EventReceivers[$i].Delete()
}
}
$spList.Update()
That solves my issue.

January 31st, 2012 at 1:50 pm
That’s very good to know in the first place that this is a problem after migration.