4

I'm having a very similar problem to:

Dynamics CRM 2011 - The plug-in type could not be found

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.ArgumentNullException: Value cannot be null.
Parameter name: The plug-in type could not be found in the plug-in assembly: Enlighten.CRM.Customisations.Job.CreateJobDetail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <d2p1:key>CallStack</d2p1:key>
      <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">   at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IServiceEndpointNotificationService serviceBusService, IOrganizationServiceFactory organizationServiceFactory, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext)
   at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IServiceEndpointNotificationService serviceBusService, IOrganizationServiceFactory organizationServiceFactory, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext)
   at Microsoft.Crm.Sandbox.SandboxWorker.Execute(SandboxCallInfo callInfo, SandboxPluginExecutionContext requestContext, Guid pluginAssemblyId, Int32 sourceHash, String assemblyName, Guid pluginTypeId, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, SandboxRequestCounter&amp; workerCounter)</d2p1:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <Message>System.ArgumentNullException: Value cannot be null.
Parameter name: The plug-in type could not be found in the plug-in assembly: Enlighten.CRM.Customisations.Job.CreateJob</Message>
  <Timestamp>2015-07-23T23:32:27.2903692Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText>

[Enlighten.CRM.Customisations.Job.Deploy: Enlighten.CRM.Customisations.Job.CreateJob]
[d2c5efd5-452b-e511-80c4-00155d00461a: Opportunity Create]


</TraceText>
</OrganizationServiceFault>

This is an existing plugin that I have working in CRM 2011. The main difference is that I've updated the SDK to be against 7.0.0.1 using the nuget package.

https://www.nuget.org/packages/Microsoft.CrmSdk.Extensions/7.0.0.1

The previous question suggested that it was version differences but as far as I can tell my deployment is a newer version if anything (as seen below in the deployment manager below) so the SDK version shouldn't be a problem.

Organisation version

Any ideas?

Technicolour
  • 677
  • 1
  • 7
  • 17
  • On which version of Dynamics CRM is your plugin installed, 2011 or 2015? In your question you are mentioning 2011, but you tagged your question with `dynamics-crm-2015`. – Henk van Boeijen Jul 24 '15 at 06:43

2 Answers2

1

I suggest you use the assemblies provided in the respective SDK of the version of your CRM.

If you are deploying the plugin to a CRM 2011 environment you should still use assemblies supplied in the 2011 SDK. (i.e. version 5...*)

Alessi
  • 759
  • 3
  • 11
  • That's exactly what I'm doing? CRM2015 is v7.0.* – Technicolour Jul 24 '15 at 01:13
  • I understand now. My next suggestion would be to inspect the CreateJobDetail Plugin's properties in Plugin Registration Tool. Check if both FriendlyName and Name values are present. – Alessi Jul 24 '15 at 02:02
0

It sounds like an issue with the isolation mode and/or loading the dependent dll's correctly.

If you are using Sandbox isolation mode when registering the plugin, you need to make sure you merge any dependencies with ilmerge before registering the plugin assembly.

If you have an isolation mode of none, make sure the assembly is in the GAC or placed in the bin\assembly folder in the CRM installation directory on the server.

BlueSam
  • 1,888
  • 10
  • 17