【问题标题】:Dynamics CRM 2015 - The plug-in type could not be foundDynamics CRM 2015 - 找不到插件类型
【发布时间】:2015-07-23 23:48:07
【问题描述】:

我遇到了一个非常相似的问题:

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>

这是我在 CRM 2011 中使用的现有插件。主要区别在于我使用 nuget 包将 SDK 更新为针对 7.0.0.1。

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

上一个问题表明这是版本差异,但据我所知,如果有的话,我的部署是较新的版本(如下面的部署管理器中所示),因此 SDK 版本应该不是问题。

有什么想法吗?

【问题讨论】:

  • 您的插件安装在哪个版本的 Dynamics CRM 上,2011 年还是 2015 年?在您的问题中,您提到了 2011 年,但您使用 dynamics-crm-2015 标记了您的问题。

标签: c# dynamics-crm dynamics-crm-2015


【解决方案1】:

我建议您使用您的 CRM 版本的相应 SDK 中提供的程序集。

如果您将插件部署到 CRM 2011 环境,您仍应使用 2011 SDK 中提供的程序集。 (即版本 5...*)

【讨论】:

  • 这正是我正在做的? CRM2015 是 v7.0.*
  • 我现在明白了。我的下一个建议是在插件注册工具中检查 CreateJobDetail 插件的属性。检查是否同时存在 FriendlyName 和 Name 值。
【解决方案2】:

这听起来像是隔离模式和/或正确加载依赖 dll 的问题。

如果您在注册插件时使用沙盒隔离模式,则需要确保在注册插件程序集之前将所有依赖项与ilmerge合并。

如果您的隔离模式为none,请确保程序集位于GAC 中或放置在bin\assembly 文件夹中服务器上的 CRM 安装目录。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-01
    • 2015-10-10
    • 1970-01-01
    • 1970-01-01
    • 2016-02-12
    相关资源
    最近更新 更多