Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Plug-in assembly does not contain the required types or assembly content cannot be updated. error

Posted on by Microsoft Employee

Hello Guys,

I have an existing assembly which I want to update. This assembly contains 4 workflows registered as plugins. This is already present in the environment and I want to update it. But I am being thrown the following error. I am trying to register it with Isolation mode mentioned as "None". Please help guys. 

Using On Premise MS Dynamics CRM 2016. 

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.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="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">
<ErrorCode>-2147204725</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
<Timestamp>2017-07-13T01:25:29.1839613Z</Timestamp>
<InnerFault>
<ErrorCode>-2147204725</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Plug-in assembly does not contain the required types or assembly content cannot be updated.</Message>
<Timestamp>2017-07-13T01:25:29.1839613Z</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()

*This post is locked for comments

  • Suggested answer
    Kjeld Poulsen Profile Picture
    Kjeld Poulsen 180 on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    I had the same problem on 9.0 on premise, and because I am actually creating PluginTypes based on the actually DLL uploaded, by first unregistre all plugins no longer in the plugin assm, then upload the DLL, and finally registre plugintypes, based on class decoration properties in my assembly plugin classes, i know for sure that the plugin's are not missing. In the early days of 9.0 online, I experience that a lot a customizations was cached - even long after a deployment of a solution, and publish of same.... So i was thinking, maeby the 9.0 on premise i caching the DLL, and is comparing with the old DLL, even after a new DLL has been uploaded when registre new steps. To see if this was the case, i did the following:  1) try to deploy.  argh..  got the error.  2) iisreset (only possible onprem..). 3) try to deploy again ... voila, now it worked.

  • Suggested answer
    Srikanta Mahapatro Profile Picture
    Srikanta Mahapatro 190 on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    You can Un-Register the specified  plugin through plugin registration tool and try to do again...

    Hope it will help!!!

  • JandostKhoso Profile Picture
    JandostKhoso 266 on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    Hello

    I removed the plugin from my CRM instance but still I am getting the same error. The problem is that I cannot find the plugin in steps and plugin assembly section of CRM and at the same time I cannot register the assembly because of the above error.

    Any suggestions?

  • JandostKhoso Profile Picture
    JandostKhoso 266 on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    Hello

    I removed the plugin from my CRM instance but still I am getting the same error. The problem is that I cannot find the plugin in steps and plugin assembly section of CRM and at the same time I cannot register the assembly because of the above error.

  • Panayiotis Profile Picture
    Panayiotis on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    Had a very weird case, and the tool did not add value.

    More specifically, I changed the minor number of the version number of the assembly (Major.Minor.Build.Revision), and because of the mismatch it would not allow me to update the assembly. Finally found the mismatch and also documentation that the Major and Minor parts of the version number should not change.

    Hope this helps at least someone.

  • Panayiotis Profile Picture
    Panayiotis on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    You can always use ILMerge instead of links

  • Hittori Profile Picture
    Hittori 72 on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    Hi

    I am not going to correct anything, but to share my experience.

    I have a DLL solution for my plugin and two external DLL solutions (Helper classes and another static dll which helps me translate error code into easy to understand error messaage for the users)

    So, i make my reference in my plugin project with those two projects (all within the same solution) and when i push it, i received this error.

    Thanks to Shahar Journo, a coworker of mine, i learn that i can not do that :(

    That instead of using an external reference, i have to Add as a link all the files of those two other projects to create a unique DLL with the three files i need.

    Now, when i build my solution, i have a unique DLL with all my needed classes and i am able to push it with the Plugin Registration Tool.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    Hello Alex,

    Thanks for your suggestion. It was a weird issue. I was the deployment admin, I registered the plugin in "None" isolation mode and the issue was CRM , for some reason was thinking that am trying to register in Sandbox isolation mode. This was causing the issue. I was being thrown the No sandbox server available error. I registered the plugin again and it seems to work now.

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    Hi Donald,

     you have to look at the differences between the assembly you have in CRM and the assembly you are trying to register. Your new assembly has to have the same signature (you did not compile it with a new key, right?), and it has to have the same classes which are currently registered as plugin steps. You can add new classes, but you can't remove/rename existing classes (unless you remove a step as well).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Plug-in assembly does not contain the required types or assembly content cannot be updated. error

    Hi Ravi,

    Thank you for your suggestion. Will definitely check this tool out.  As mentioned earlier, there is no input/output parameters when it comes to this assembly. This is because, this assembly contains 5 items and all 5 of them are workflow as plugin activities. Any suggestions?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans