During the upgrade process to Dynamics GP 2013 R2 with one of my customers we got the error in the subject, the issue is with dropping one of the SQL level Assemblies called “System.DirectoryServices” that been used by “Microsoft.Dynamics.GP.WorkflowGP.WorkflowEngine”.
The "System.DirectoryServices" assembly is being used by the Workflow module in Dynamics GP, if you have workflow installed you will not be able to drop this reference as you will be having another assembly depending on this and the other assembly is being used by 7 functions and stored procedures.
This assembly basically is used to connect your active directory and get the needed details that are being used by the system, dropping all these objects is safe as the upgrade process will automatically create them back for you.
To resolve the issue, first find the following functions and stored procedures, right click them one by one and hit drop:
Go to DYNAMICS database and navigate “Programmability>> Assemblies” and find “Microsoft.Dynamics.GP.WorkflowGP.WorkflowEngine”, right click the assembly and hit drop and then drop “System.DirectoryServices”:
Reinitiate Dynamics GP Utilities and and the upgrade will proceed safely, don’t worry about the deleted objects as the upgrade will recreate them all.
Hope that this helps.