Plugin with references not working on CRM 2011

DorR picture DorR · Jul 12, 2011 · Viewed 8.3k times · Source

I have created a plugin and used a reference to another project (DLL) I have created. The problem is when I try to run the plugin, I get a CRM error saying:

Could not load file or assembly 'XXX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a760feb9ec7271a9' or one of its dependencies. The system cannot find the file specified.

Does anyone have any idea on solving this one?

Answer

ccellar picture ccellar · Jul 12, 2011

You have to deploy the referenced assembly either to the GAC or merge it with your one (with ILMerge)

See also http://msdn.microsoft.com/en-us/library/gg309620.aspx and Creating a single CRM plugin DLL to store in the CRM database