Plugin with references not working on CRM 2011

后端 未结 4 556
长情又很酷
长情又很酷 2020-12-31 17:07

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:

相关标签:
4条回答
  • 2020-12-31 17:50

    I have a blog post here on how you can put it all in 1 DLL without ILMerge: All References within CRM2011 plugin. We've yet to have a dll issue since we started doing this.

    NB this approach rules out the use of Sandboxed mode (i.e., you will not be able to use this approach should you require your plugin to work in Dynamics CRM Online).

    0 讨论(0)
  • 2020-12-31 18:00

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

    0 讨论(0)
  • 2020-12-31 18:02

    We have had this error several times over the last 6 months and each time, despite me or the other developers swearing blind it would not be the case, it has turned out to be a DLL version problem.

    Are you installing the plugin to disk, DB or GAC?

    If installing to the GAC, I believe external DLLs go in the GAC as well. If installing to the DB or to disk, I believe DLLs go in the \assembly\bin folder.

    0 讨论(0)
  • 2020-12-31 18:11

    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

    0 讨论(0)
提交回复
热议问题