During a recent migration, we ran into an issue when attempting to migrate users from one domain to another using stsadm migrateuser.  Hopefully this will help any others that are getting this strange error.  Our environment was a small MOSS 2007 64-bit farm installed with slipstreamed SP2, with the February 2010 cumulative update applied. 

 We were moving from an on-premise to Hosted solution, so this required a new domain and user accounts.  Since the new domain wouldn’t know anything about the old domain’s user accounts, we added the –ignoresidhistory switch.  We ran the following command:

 stsadm –o migrateuser –oldlogin domain\name –newlogin domain\name -ignoresidhistory

and then got this error message:

 Could not load user migrator assembly "Microsoft.SharePoint.Portal, Version=12.0
.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c", class "Microsoft.ShareP
oint.Portal.PortalAccountMigrationManager", referenced in feature "f0deabbb-b0f6
-46ba-8e16-ff3b44461aeb".

 Our first thought was that something was missing or wrong in the assembly for the class.  The assembly existed in the GAC:

SharePoint Global Assembly Cache

 

We opened the assembly using Reflector, and we verified that the class existed within the assembly as well:

 

 

So now what?  After some testing, we were able to get the command to complete successfully.  The amazing part is how.  We uninstalled (that’s right, uninstalled) the UserMigrator feature using this command:

 stsadm –o  uninstallfeature –name UserMigrator -force

 After this completed, we ran the command again and all was well.  I don’t know why uninstalling the feature makes the component work, but it did.