crm 2011 online: Issue when debugging custom workflow activity RRS feed

  • Question

  • Hi,

    I have created a custom workflow activity for CRM 2011 online.

    The workflow fails, so I am trying to debug it.I have installed profiler, attached visual studio to plugin registration tool.

    But I get this error when I try to 'Start Execution' from Plugin reg tool.

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Could not load file or assembly 'Microsoft.Xrm.Sdk.Workflow, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
          <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">   at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
       at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
       at System.Activities.WorkflowInvoker.Invoke(IDictionary`2 inputs)
       at PluginProfiler.Library.WorkflowAppDomainProxy.ExecuteCore(Stopwatch watch, ProfilerExecutionReport report, Object instance, Object executionParameter)
       at PluginProfiler.Library.AppDomainProxy.Execute(ProfilerExecutionConfiguration configuration, ProfilerExecutionReport report)</a:value>
      <Message>Could not load file or assembly 'Microsoft.Xrm.Sdk.Workflow, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.</Message>
      <InnerFault i:nil="true" />
      <TraceText i:nil="true" />

    I am not sure what the issue, I have been stuck with this.

    It will be appreciated if you can assist me in this issue please.



    Tuesday, August 27, 2013 1:17 PM

All replies

  • Hi Wesley, 

    It seems like the dll Microsoft.Xrm.sdk.Workflow can't be loaded or found. have you installed the latest SDK ? , if you have, maybe the reference is broken, so you can try to remove and add the reference to the specified dll and rebuild.

    hope this helps

    best regards.

    Tuesday, August 27, 2013 2:17 PM
  • Another possibility is if your assembly references any external assembly, other than the Crm and Workflow ones. This would cause the same error. It's not possible to call external assemblies in Crm Online

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, August 27, 2013 7:28 PM
  • Hi Andersen

    I tried adding the dll again from latest SDK. But I get the same error again.

    Kindly help me.



    Wednesday, August 28, 2013 3:48 AM
  • Hi David

    I am not referencing any external assembly. Not sure why this issue is there.

    Annoyed from 2 days.7




    Wednesday, August 28, 2013 3:51 AM
  • Hi Wesley, 

    I've read this blog post where the same problem is solved by placing the needed dll's in the bin folder of the ISV, Check it out it might be helpful.




    Wednesday, August 28, 2013 6:00 AM
  • I suggest using the ITracingService to trace all parts of the custom workflow. Throw an InvalidPluginExecutionException at the end of the plugin code and then register the updated assembly with CRM.

    Triggering the workflow activity will result in a Failed System Job which you can then open up and view the error.

    Wednesday, August 28, 2013 9:05 AM
  • I'm getting an identical error. Did you ever find resolution?
    Monday, June 16, 2014 2:25 PM