注册插件(isolate):ssembly file name (CRM.XXXXXXXXXX.Plugins.dll) is in invalid format. Only file name is

当注册plugin时(注册到disk),在load编译好的assembly之后在相应的实体后面出现-isolate。
接着注册step的时候发现发现注册不成功。
报错如下:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Assembly file name (CRM.XXXXXXXXXX.Plugins.dll) is in invalid format. Only file name is allowed.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorCode>-2147204719</ErrorCode>
  <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Assembly file name (PetroCRM.CRM.Equipment.Plugins.dll) is in invalid format. Only file name is allowed.</Message>
  <Timestamp>2015-12-04T01:20:58.5470066Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147204719</ErrorCode>
    <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Assembly file name (PetroCRM.CRM.Equipment.Plugins.dll) is in invalid format. Only file name is allowed.</Message>
    <Timestamp>2015-12-04T01:20:58.5480091Z</Timestamp>
    <InnerFault i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <TraceText i:nil="true" />
</OrganizationServiceFault>

Server stack trace: 
   在 System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   在 System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   在 System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   在 System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   在 Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
   在 Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
   在 Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterStep(CrmOrganization org, CrmPluginStep step)
   在 Microsoft.Crm.Tools.PluginRegistration.StepRegistrationViewModel.btnRegister_Click(Object sender, EventArgs e)

解决方案:
在sql查询器中执行下面sql

select Path,PluginAssemblyId,* from [dbo].[PluginAssemblyBase]

会发现其中的Path的值是CRM中的完整路径。
我们需要将其修改为只是dll文件名就可以。
所以执行下面的sql:

update [PluginAssemblyBase] set Path='CRM.XXXXXXXXXX.Plugins.dll'
where PluginAssemblyId='2B87612D-264B-492F-BC50-D624ADE7B7B4'
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值