Workflow 2.0 Error: A .NET Framework error occurred during execution of user-defined routine or aggregate “GetAssignedUsers”: System.IO.FileLoadException: Could not load file or assembly ‘System.Directo
The Dynamics GP support team has seen an increase in cases regarding the following error when working with Workflow 2.0:
MicrosoftSQL Server Native Client 10.0SQL ServerA .NET Framework error occurred during execution of user-defined routine or aggregate “GetAssignedUsers”: System.IO.FileLoadException: Could not load file or assembly ‘System.DirectoryServices,Vers
As noted by my colleague Dan in a past article, the error usually occurs after moving the GP databases to a different SQL instance. In most cases, this can be resolved by running the wfDeployCLRAssemblies stored procedure.
However, there may be instances where you need to drop all procedures, functions and assemblies deployed by the wfDeployCLRAssemblies stored procedure. As some customers may feel uncomfortable dropping those objects themselves, the support team has developed scripts to automate the task.
A few items to note before running the following scripts:
-
**Ensure you have a viable, working database backup before proceeding with any scripts**
-
The 2015, 2016 and 2018 versions of the scripts will work with GP 2015 R2, 2016 R2 and 2018 R2, respectively.
-
The scripts are provided AS IS
-
You will need to execute the wfDeployCLRAssembles stored procedure again after running the scripts, which will redeploy the procedures, functions and assemblies.
If the error still occurs after running the script and the wfDeployCLRAssemblies stored procedure, please open a support case for assistance.
GP 2018/R2:
DropAllWFObjectsandAssemblies2018.txt
GP 2016/R2:
dropAllWFobjectAndAssemblies2016.txt
GP 2015/R2:
dropAllwfobjectsandAssemblies2015.txt
GP 2013 R2:
DropAllWFObjectsAndAssemblies2013R2.txt
Comments
-
There is no need for a specific script to GP 18.x or up.. The drop statements above were all included in the "wfDeployClrAssemblies" script already after GP 2016 and now checks for the existence of those assemblies and drops them before re-creating them all.
-
Are there new script for 18.2? I am getting this error. Also what do need to have backups of incase it goes bad? Thanks,
-
*This post is locked for comments