I have a CRM Dynamics 2011 server that has a custom plugin running that fires on the update of a custom entity.
If this entity is updated manually (i.e. through user interaction), the plugin fires correctly and behaves as expected.
If the entity is updated through a workflow, then the workflow fails with the error:
"Could not load file or assembly PW.CRM.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cdbc0010db644fd3' or one of its dependencies. The system cannot find the file specified."
The plugin dll is called PW.CRM.Plugins and it references the PW.CRM.Model dll.
We also have the following dlls referenced in the plugin: microsoft.crm.sdk.proxy microsoft.xrm.client microsoft.xrm.sdk microsoft.xrm.sdk.workflow
All referenced dll's that are in the plugin have been registered in the GAC for that server. I have also at tried putting the dll's in the bin directory in CRMWeb on the server.
The plugin fires synchronously on pre-operation. We have a dev server running that has the same plugin setup on it and we cannot reproduce the error on it.
Have checked the event log for the server and cannot find any references to the issue either.
Running Microsoft Dynamic CRM 2011 on Windows 2008 R2 using IIS 7.5.
Any help, guidance or ideas greatly appreciated.