Technicolour
Technicolour

Reputation: 697

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

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?

Upvotes: 4

Views: 3291

Answers (2)

BlueSam
BlueSam

Reputation: 1888

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.

Upvotes: 0

Alessi
Alessi

Reputation: 769

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...*)

Upvotes: 1

Related Questions