Skip to main content
Post a question

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id : xAYQ44ciOyqou1VUgW1wHt

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:

  1. **Ensure you have a viable, working database backup before proceeding with any scripts**

  2. The 2015, 2016 and 2018 versions of the scripts will work with GP 2015 R2, 2016 R2 and 2018 R2, respectively.

  3. The scripts are provided AS IS

  4. 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

*This post is locked for comments

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture Beat Bucher GP Gee... 28,056 Super User 2024 Season 1
    Posted 15 Nov 2021 at 20:06:49
    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.
  • DB ERP Profile Picture DB ERP 75
    Posted 15 Apr 2021 at 22:37:16
    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,
  • KellyanneB Profile Picture KellyanneB 15
    Posted 03 Dec 2020 at 15:16:36
    Hi there, What scripts are there for GP 2018 and GP now?