Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Field Service forum / Error Unable to load p...
Field Service forum

Error Unable to load plug-in assembly when Debugging custom workflow activites assemblies

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I'm new in Dynamics CRM 365. I tried to debbug custom workflow activities with this : sample https://dynamict.wordpress.com/2016/12/05/debug-your-custom-code-plug-ins-custom-workflow-activities-using-the-plug-in-profiler/

I used CRM SDK tools  9.0.0.7, 9.0.2.3, 8.2. 

I have the same error every time when try to Profile Workflow. The step and workflow show in the form but after click the button the error "Unable to load plug-in assembly " shows.  The CRM is microsoft instance for development.

Does this debugging option work?

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unable to load plug-in assembly.
Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">
<ActivityId>1e9c1f0a-cbf3-4751-b1ea-301532cdbec8</ActivityId>
<ErrorCode>-2147204719</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<a:key>ApiExceptionSourceKey</a:key>
<a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema">Plugin/Microsoft.Crm.ObjectModel.PluginAssemblyService</a:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<a:key>ApiOriginalExceptionKey</a:key>
<a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema">Microsoft.Crm.CrmException: Unable to load plug-in assembly. ---&gt; Microsoft.Crm.CrmException: Unable to load plug-in assembly.
at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.LoadCrmPluginAssemblyMetadata(IBusinessEntity pluginAssembly, ExecutionContext context, Boolean loadAllMetadata)
at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.RetrieveAssemblyMetadata(IBusinessEntity pluginAssembly, ExecutionContext context, Boolean retrieveFromExisting, Boolean forSystemAssembly)
at Microsoft.Crm.ObjectModel.PluginAssemblyServiceInternal`1.ValidateOperation(String operationName, IBusinessEntity entity, ExecutionContext context)
at Microsoft.Crm.ObjectModel.SdkEntityServiceBase.CreateInternal(IBusinessEntity entity, ExecutionContext context, Boolean verifyAction)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass1_1.&lt;Execute&gt;b__0()</a:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<a:key>ApiStepKey</a:key>
<a:value i:type="b:guid" xmlns:b="schemas.microsoft.com/.../Serialization">3ecabb1b-ea3e-db11-86a7-000a3a5473e8</a:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<a:key>ApiDepthKey</a:key>
<a:value i:type="b:int" xmlns:b="www.w3.org/.../XMLSchema">1</a:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<a:key>ApiActivityIdKey</a:key>
<a:value i:type="b:guid" xmlns:b="schemas.microsoft.com/.../Serialization">1e9c1f0a-cbf3-4751-b1ea-301532cdbec8</a:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<a:key>ApiPluginSolutionNameKey</a:key>
<a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema">System</a:value>
</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>
<a:key>ApiStepSolutionNameKey</a:key>
<a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema">System</a:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Unable to load plug-in assembly.</Message>
<Timestamp>2018-05-17T07:26:57.0276639Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>1e9c1f0a-cbf3-4751-b1ea-301532cdbec8</ActivityId>
<ErrorCode>-2147204719</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Unable to load plug-in assembly.</Message>
<Timestamp>2018-05-17T07:26:57.0276639Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at PluginProfiler.Library.ProfilerManagementUtility.CreateWorkflowAssembliesAndTypes(CrmServiceClient service, ActivityAssemblyCompilerConfiguration configuration, Dictionary`2 types, OptionSetValue isolationMode, DateTime lastModified, IEnumerable`1 mappedAssemblies)
at PluginProfiler.Library.ProfilerManagementUtility.InstrumentWorkflowSteps(CrmServiceClient service, Guid workflowId, String keyFileName, CustomActivityStep[] workflowSteps)
at PluginProfiler.Library.ProfilerManagementUtility.EnableWorkflow(CrmServiceClient service, String overrideKeyFileName, Guid workflowId, Boolean persistToEntity, String persistenceSessionKey, Boolean includeSecureInformation, Boolean isContextReplay, CustomActivityStep[] workflowSteps)
at Microsoft.Crm.Tools.PluginRegistration.CommonControls.ProfilerSettingsViewModel.btnOk_Click()

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error Unable to load plug-in assembly when Debugging custom workflow activites assemblies

    I believe those solutions will work with on-premise but in my case, i am working with an online install.

  • Andreas Cieslik Profile Picture
    Andreas Cieslik 9,267 on at
  • Andreas Cieslik Profile Picture
    Andreas Cieslik 9,267 on at
    RE: Error Unable to load plug-in assembly when Debugging custom workflow activites assemblies

    you try to do this with online or on-premise System?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error Unable to load plug-in assembly when Debugging custom workflow activites assemblies

    No.  The only solution I found was to use the TracingService and log the S**T out of my code and make small changes, re-upload, and run again.  I was finally able to complete my project doing this.  It was very annoying.  

  • ZMansuri Profile Picture
    ZMansuri 85 on at
    RE: Error Unable to load plug-in assembly when Debugging custom workflow activites assemblies

    Hi Guys, any solution ?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error Unable to load plug-in assembly when Debugging custom workflow activites assemblies

    Has anyone resolved this?  I am getting the same issue.  No 3rd party DLL's.  I know my workflow activity is running because I added some tracing and even threw an exception and it does hit it.  I need to be able to step through my code though.  Any thoughts?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error Unable to load plug-in assembly when Debugging custom workflow activites assemblies

    I am getting the same error. No 3rd party DLLs in my case.

  • Suggested answer
    Andreas Cieslik Profile Picture
    Andreas Cieslik 9,267 on at
    RE: Error Unable to load plug-in assembly when Debugging custom workflow activites assemblies

    Do you use any third party DLLs like Newtonsoft.Json.dll? If so, have you merged them with ILmerge?

    Guide to merge: www.thrives.be/.../external-assemblies-dynamics-crm-plugins-ilmerge

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans