C# – Plugin with references not working on CRM 2011

ccrmdynamics-crm-2011

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?

Best Answer

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