无法在CRM 2011插件导入中插入重复键?

时间:2012-11-19 16:35:49

标签: dynamics-crm dynamics-crm-2011 dynamics-crm-4

我已从prod服务器导出插件,并在导入测试服务器时收到以下错误消息。

  

未处理的异常:System.Web.Services.Protocols.SoapException:   服务器无法处理请求。

     

细节:

     

0x80040237

     

无法插入重复的密钥。

     

平台

     

     

在   System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage   消息,WebResponse响应,流responseStream,布尔值   asyncCall)

     

在   System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(字符串   methodName,Object [] parameters)

     

在PluginRegistrationTool.CrmSdk.CrmService.Create(BusinessEntity)   实体)

     

在   PluginRegistrationTool.RegistrationHelper.RegisterAssembly(CrmOrganization   org,String pathToAssembly,CrmPluginAssembly assembly)

     

在   PluginRegistrationTool.ImportExport.ImportSolution(CrmOrganization   org,ICollection 1 assemblies, ICollection 1 checkedTreeNodes,   IDictionary`2 pathList)

     

在PluginRegistrationTool.ImportExportForm.btnExecute_Click(Object   发件人,EventArgs e)

2 个答案:

答案 0 :(得分:0)

在测试服务器上检查是否已存在同名的插件/步骤/图像。如果是,则在尝试导入之前先删除它们。

我建议您在尝试导入之前先删除所有已注册的插件。

答案 1 :(得分:0)

enter image description here当您创建新插件时,Visual Studio将根据管道阶段(预验证,操作前,操作后)主要实体(联系人,自动创建步骤/类名称)组织)和消息(创建,更新等)例如,PostContactUpdate或PreOrganizationUpdate,所以如果您正在制作具有相同消息的另一个插件,管道阶段和主要实体并且您接受了可以解释您为什么的默认类名得到错误。更改类名并重新部署应该为您修复。