Michal Demjančuk
Michal Demjančuk

Reputation: 39

Plugin Registration Tool - MS Dynamics 2013.Plugin assembly does not contain the required types or assembly content cannot be updated

Im trying to update plugin in CRM Dynamics 2013 via Plugin Registration Tool, but it´s still showing same error :

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>

Hope my description is okay. Thanks for help.

Upvotes: 1

Views: 573

Answers (1)

Federico Jousset
Federico Jousset

Reputation: 1761

That error could be caused for several reasons, the most common are:

  • Changes in the classes' name
  • Changes in the signing key file
  • Referencing external dlls (could be fixed using ILMerge)

You will need to revert any of those changes to be able to update the plugin. The second option is unregister the plugin and register it again.

Upvotes: 2

Related Questions