插件注册工具 - MS Dynamics 2013.Plugin程序集不包含所需类型或程序集内容无法更新

时间:2016-08-19 08:03:26

标签: c# visual-studio-2012 plugins dynamics-crm-2013

我试图通过插件注册工具更新CRM Dynamics 2013中的插件,但它仍然显示相同的错误:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Plug-in assembly does not contain the required types or assembly content cannot be updated.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorCode>-2147204725</ErrorCode>
  <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
  <Timestamp>2016-08-19T07:56:34.9589441Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147204725</ErrorCode>
    <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
    <Timestamp>2016-08-19T07:56:34.9589441Z</Timestamp>
    <InnerFault i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <TraceText i:nil="true" />
</OrganizationServiceFault>

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 Microsoft.Crm.Tools.Libraries.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly, PluginType[] type)
   at Microsoft.Crm.Tools.AssemblyRegistration.PluginRegistrationViewModel.btnregisterClick()

RegisterFile.crmregister:

<?xml version="1.0" encoding="utf-8"?>
<Register xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/crm/2011/tools/pluginregistration">
  <Solutions>
    <Solution Assembly="MarkAsLostOpportunityWhenMarkedAccount.Plugins.dll" Id="e33d47a4-f3ba-440e-a693-2523a2ffe023" IsolationMode="Sandbox" SourceType="Database" />
  </Solutions>
  <XamlWorkflows />
</Register>

希望我的描述没问题。 谢谢你的帮助。

1 个答案:

答案 0 :(得分:2)

该错误可能由多种原因引起,最常见的是:

  • 课程的变化&#39;姓名
  • 签名密钥文件的更改
  • 引用外部dll(可以使用ILMerge修复)

您需要还原任何这些更改才能更新插件。 第二个选项是取消注册插件并再次注册。