Plugin with links not working on CRM 2011

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

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

Does anyone have any ideas on how to solve this problem?

+8
c # dynamics-crm-2011 crm
source share
4 answers

You need to deploy the reference assembly either in the GAC, or combine it with yours (with ILMerge)

See also http://msdn.microsoft.com/en-us/library/gg309620.aspx and Creating a single DLL module for CRM modules for storage in a CRM database

+10
source share

I have a blog post on how you can put all this in 1 DLL without ILMerge: All links in the CRM2011 plugin . Since we started to do this, we have not had a problem with dll.

NB this approach eliminates the use of Sandboxed mode (i.e. you cannot use this approach if you want your plugin to work in Dynamics CRM Online).

+4
source share

We had this error several times over the past 6 months, and each time, despite the fact that I or other developers were cursing, this is not so, it turned out to be a problem with the version of the DLL.

Do you install the plugin on disk, DB or GAC?

If you install in the GAC, I believe that external DLLs are also included in the GAC. If you are installing DB or on disk, I believe that the DLL files are located in the \ assembly \ bin folder.

+2
source share

Sometimes Anti-Virus will prevent ASP.NET from accessing the file or assembly, I suggest you sign the assembly with a strong name and add it to the GAC: here you can find additional information http://support.microsoft.com/kb/815808

0
source share

All Articles