1
votes

I want to use a couple of 3rd. party assemblies in a custom workflow. The custom workflow compiles fine as well as the plugin registration. However, when I call it I get an error about an assembly not found. The assembly it complains about is a 3rd. party assembly that I use along with my code. ILMerge is not an option because that also throws an exception. I have tried to copy the offending assembly directly onto the bin directory of the CRM installation (CRM 2011 Installation\wwwroot\bin) and the bin for the actual CRM IIS application (\Program Files\Microsoft Dynamics CRM\CRMWeb\bin) to no avail.

Has anybody run into this?

1

1 Answers

3
votes

If your plugin/workflow activity references other libraries, you have two possibilities to deploy them

  1. Merge the assemblies with ILMerge. See http://dynamicsuser.net/blogs/crm/archive/2010/11/09/how-to-reference-assemblies-from-plug-ins.aspx
  2. Deploy the dependecies to the GAC of every server in the farm (and all clients, if the plugin os used offline). Therefore, this is not the recomended approach.

Depending on your plug-in’s design, your plug-ins may require other referenced assemblies to run. Regardless of whether you deploy your plug-in to the database or disk, if your plug-in requires other assemblies to run, you must put copies of these assemblies in the Global Assembly Cache (GAC) on each server where the plug-in is to execute. This does not apply to a Microsoft Dynamics CRM Online server because you do not have access to the GAC on that server.

See http://msdn.microsoft.com/en-us/library/gg309620.aspx