locked
Microsoft.Crm.Sdk.InvalidPluginExecutionException: Could not load file or assembly RRS feed

  • Question

  • I've registered a plugin on all activity entities (Phone Call, Appointment, Fax, Email, Letter) that updates Activity Parties of the activity. Plug-in is registered as "Asynchornous-Post Stage"  in child pipeline. Though the plug-in registration is successful, for some reason it is not working as expected. When I checked the Asycoperationbase table, I see a message logged there as below...

    Exception while trying to execute AsyncOperationId: {2D547B97-8121-E111-96F3-0011259B74EE} AsyncOperationType: 1 - Microsoft.Crm.Sdk.InvalidPluginExecutionException: Could not load file or assembly '<<Custom Assembly Name>>, Version=2.0.0.0, Culture=neutral, PublicKeyToken=94ab43df1b57abdf' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load file or assembly '<<Custom Assembly Name>>, Version=2.0.0.0, Culture=neutral, PublicKeyToken=94ab43df1b57abdf' or one of its dependencies. The system cannot find the file specified.

    File name: '<<Custom Assembly Name>>, Version=2.0.0.0, Culture=neutral, PublicKeyToken=94ab43df1b57abdf'

    at Corp.Crm.Plugins.Activities.LetterPostCreate.Execute(IPluginExecutionContext context)

    at Microsoft.Crm.Asynchronous.EventOperation.InternalExecute(AsyncEvent asyncEvent)

    WRN: Assembly binding logging is turned OFF.

    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

    Note: There is some performance penalty associated with assembly bind failure logging.

    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    The plug-in DLL has dependency with other assemblies and I've made sure that the assemblies are present in "\Program Files\Microsoft Dynamics CRM\CRMWeb\bin"  folder as well as in "\Program Files\Microsoft Dynamics CRM\Server\bin\assembly" folder. Also while registering the plug-in all the dependent assemblies were copied in Plug-in Registration tool EXE's folder. Any pointers on how to fix this?

    Friday, December 9, 2011 4:24 AM

All replies

  • Are you using CRM 4 or CRM 2011?

     

    Have you had this plugin working before.

     

    I would start with the plugin working on one activity and see if it is working.

     

    Is there any reason why you haven't uploaded the plugin to the database?  rather than on disk.

     

    Does the plugin use any third party dll's. if so you will need to put these into the GAC on the server.

     

     


    Ben Hosking
    Check out my CRM Blog
    Linked-In Profile
    Follow Me on Twitter!
    Friday, December 9, 2011 11:10 AM
  • Hoskinator,

    Thanks for your reply.

    I'm using CRM 4.0. The plug-in was working before. It's just the new step that I've added on Activity records which is not working. The plug-in is registered in database. Just to make sure I'm not missing anything I'm keeping the DLLs in CRM folders (bin OR assembly). Yes the Plugin uses my custom DLLs. And it is working for all the steps except one without putting it into GAC.

    Saturday, December 10, 2011 3:08 AM
  • How is your CRM Server implementation, is it running on single server (all CRM Services) or Server Farm ..etc. if yes then you need to copy the dependency dll's into all the servers.

    Also verify if you have changed any public key of the dependency assemblies if so you might need to recompile everything then re-deploy.


    Thomas T(MCBMSS) If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Monday, December 12, 2011 1:57 AM
  • I've only one CRM server and I've made sure that the dependency DLLs are already there in appropriate folder. Any other pointers?

    Wednesday, December 28, 2011 5:48 AM