locked
Plugin Update error Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Could not load file or assembly 'Microsoft.Xrm.Client' RRS feed

  • Question

  • Hi, 

    kindly need help, I have create update plugin that run when update. it works fine if i update the record manually from crm, but when workflow run and update the record, i got error as below

    Plugin Trace:

    [Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]
    [UpdateStep3]


    [SQA_Notif.SQA_Notif_PluginLibrary: SQA_Notif.SQA_Notif_PluginLibrary.PostCaseUpdate]
    [8e9e4c17-c8fd-e511-a643-000c29a7f8b5: PostCaseUpdate]
    Entered SQA_Notif.SQA_Notif_PluginLibrary.PostCaseUpdate.Execute(), Correlation Id: a3fad957-3326-49b8-869b-114b4dffe528, Initiating User: 446eb646-caf4-e511-9a1c-000c29b27da8
    SQA_Notif.SQA_Notif_PluginLibrary.PostCaseUpdate is firing for Entity: incident, Message: Update, Correlation Id: a3fad957-3326-49b8-869b-114b4dffe528, Initiating User: 446eb646-caf4-e511-9a1c-000c29b27da8
    Start
    Start Write Notif Log
    Exiting SQA_Notif.SQA_Notif_PluginLibrary.PostCaseUpdate.Execute(), Correlation Id: a3fad957-3326-49b8-869b-114b4dffe528, Initiating User: 446eb646-caf4-e511-9a1c-000c29b27da8



    Error Message:

    Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9689.2166, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

    I have generate Xrm.cs with below script

    CrmSvcUtil.exe /out:Xrm\Xrm.cs /url:http://hc:5555/runworld/XRMServices/2011/Organization.svc /domain:hc /username:administrator /password:pass@pass /namespace:Xrm /serviceContextName:XrmServiceContext

    also has remove the xrm.clientfrom my plugin reference. but still have the same error.


    Saturday, April 9, 2016 5:35 AM

All replies

  • Hello,

    Are the CRM services splitted on 2 or more machines? front-end + application server for example? If yes, the required *.dll(s) might not be present on the machines where the Asynchronous service is running (Microsoft Dynamics CRM Asynchronous Processing Service).


    Cornel Croitoriu - Senior Software Developer

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Biz-Forward.comCroitoriu.NET

    Thursday, April 14, 2016 4:16 PM