我有一个可以在测试系统上运行良好的插件,但在生产时它会抛出一个奇怪的异常。该插件在联系人创建之前和之后注册。
以下是例外
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.BadImageFormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #1C99C823Detail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
<ActivityId>607632be-97ab-4704-961c-7f552681a51e</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.BadImageFormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #1C99C823</Message>
<Timestamp>2017-12-05T14:44:03.5336134Z</Timestamp>
<ExceptionRetriable>true</ExceptionRetriable>
<ExceptionSource>PluginExecution</ExceptionSource>
<InnerFault>
<ActivityId>607632be-97ab-4704-961c-7f552681a51e</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>System.BadImageFormatException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6482593B</Message>
<Timestamp>2017-12-05T14:44:03.5336134Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException>System.BadImageFormatException
答案 0 :(得分:0)
正如您所看到的,异常是BadimageFormatException,可能有以下几种情况:https://msdn.microsoft.com/en-us/library/k7137bfe.aspx
如果启用插件跟踪并查看Dynamics CRM中的插件跟踪日志,则可能会获得更好的详细信息。这是一篇好文章:https://www.powerobjects.com/2016/07/05/debugging-your-plug-ins-with-the-plug-in-trace-log/
您可以在代码中添加跟踪语句。我的猜测是集会的目标需要改变。