Charan Raju C R
Charan Raju C R

Reputation: 768

Could not load file or assembly My.Custom.Assembly.dll, Version=1.0.0.0 Culture=neutral, PublicKeyToken=def751c98b41d765 or one of its dependencies

In Microsoft Dynamics CRM 2011, I wrote one plug-in in C# for Account entity to do some operations on fields when Account record is created. In C# code I created my own custom assembly called My.Custom.Assembly.dll. Which contains some generic methods those I can use often in my plug-in. And I using this My.Custom.Assembly.dll and also added in reference in my project.
Project builds successfully and plug-in registration also.
The problem I faced when I was creating a Account record. Its throwing an error: "Could not load file or assembly My.Custom.Assembly.dll, Version=1.0.0.0 Culture=neutral, PublicKeyToken=def751c98b41d765 or one of its dependencies.The System cannot find the file specified."
I got to know the problem is with My.Custom.Assembly.dll. Can you please help me to solve this problem..?

Upvotes: 1

Views: 3013

Answers (2)

ccellar
ccellar

Reputation: 10344

Your custom assembly cannot be loaded during the execution of your plugin. Either install it in the GAC or merge it with your plugin assembly.

See my answer at Plugin with references not working on CRM 2011

Upvotes: 2

Kerry H
Kerry H

Reputation: 671

A good place to start debugging this type of issue is to use Fusion Log Viewer to see the details of how .Net runtime is attempting to load the assembly. http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx

Based on what you find in the log post more details if you need additional assitance.

You may also want to read up on How .net loads Assemblies

Upvotes: 2

Related Questions