在 CRM 2013 中注册插件时发生类型为"System.ServiceModel.FaultException"的异常



尝试在CRM 2013中注册插件时出现以下错误:

未处理的异常:

System.ServiceModel.FaultException'1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:无法加载程序集。

细节

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 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
   at PluginRegistrationTool.RegistrationHelper.RegisterPlugin(CrmOrganization org, CrmPlugin plugin)
   at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)
我认为

问题是您使用的是Microsoft.Xrm.Sdk的旧版本,版本= 5.0.0.0,您应该使用版本6。因此,请从以下链接下载最新的SDK,http://www.microsoft.com/en-ca/download/details.aspx?id=40321,替换插件项目中的dll引用,重建并尝试更新插件。

已解决

实际上它是用 C# 编写的自定义工作流的 dll 文件,而不是插件 dll...抛出此异常是因为,我正在磁盘上注册它。后来我尝试在数据库上注册它,它工作正常......
我建议大家在磁盘上注册插件,在数据库上注册工作流。
如果将来有人遇到这个问题,希望这将得到解决。

DLL 是使用插件注册工具注册的。您可以在链接中找到(下载)

相关内容

最新更新