Microsoft Dynamics GP upgrade failing on error message mentioning 'System.Runtime.Remoting' DROP ASSEMBLY script
When running an upgrade of Microsoft Dynamics GP, you may see the following error message:
"ERROR [Microsoft][SQL Server Native Client ##.0][SQL Server]DROP ASSEMBLY failed because the specified assemblies are referenced by assembly 'System.Runtime.Remoting'."
There's a couple different causes to this error message that we've seen:
>>Database Compatibility Level - In SQL Server Management Studio, for the DYNAMICS system database and all GP company databases, right-click on them and go into Properties. In the Properties window, click on the 'Options' page and verify the Compatibility Level is set to the correct version depending on your version of Microsoft SQL Server being used. Click OK to save any changes and then close and re-launch GP Utilities again to continue the upgrade.
>>Third party products: We've seen third party products cause this error most commonly. Some of these products have a series of assemblies loaded and because of this, the assemblies that Dynamics GP Utilities attempts to create is not able to complete, because these third-party assemblies can't be dropped, due to extra dependencies. Usually we have to manually drop the System.Runtime.Remoting assembly under the DYNAMICS / system database and it completes the upgrade after that.
To drop the System.Runtime.Remoting assembly, in SQL Server Management Studio, you can browse to your DYNAMICS/system database > Programmability > Assemblies, where you should see the System.Runtime.Remoting assembly. Right-click on it and attempt to delete it.
--If this assembly deletes successfully, launch GP Utilities and continue the upgrade of the DYNAMICS system database which should execute the wfDeployClrAssemblies procedure again, which will re-create this assembly and others.
--If you get a message that this assembly cannot be deleted due to dependencies, you can run the following against the system database or manually delete the following: (Scripts need to be run in order)
<StoredProcedures>
DROP PROCEDURE GetAssignedUsers
DROP PROCEDURE SendWorkflowAssignmentEmail
DROP PROCEDURE SendWorkflowCompletionEmail
DROP PROCEDURE TestEmail
<Scalar-Valued Functions>
DROP FUNCTION GetObjectGuidByUser
DROP FUNCTION IsValidUserByUser
DROP FUNCTION IsValidUserByObjectGuid
<Assemblies>
DROP ASSEMBLY Microsoft.Dynamics.GP.WorkflowGP.WorkflowEngine
DROP ASSEMBLY Microsoft.Azure.ActiveDirectory.GraphClient
DROP ASSEMBLY System.Web
DROP ASSEMBLY System.Runtime.Remoting
Once these objects are dropped so that the System.Runtime.Remoting assembly no longer exists under the DYNAMICS/system database, launch GP Utilities again and continue with the upgrade, which should now get past this error message.
As mentioned, usually this error is seen most commonly in relation to having third-party products installed that have their own assemblies in the GP system database which keep GP Utilities from doing what it needs to do, so it's not a 'known' upgrade issue, but something we wanted to make the public aware so preventive actions can be taken as needed.
Thank you!!

Like
Report
*This post is locked for comments