Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Cant deploy workflows after Upgrade to CRM 365

(0) ShareShare
ReportReport
Posted on by

Hi,

We recently upgraded from CRM 2016 to 365 (8.2). We are trying now to update an old workflow that was written by old developer, and where we are having issues (The error at the end). From the error we understood that some workflows are missing from the new assembly. So we used Delta Plugins tool to compare the assembly that exist in CRM and the new assembly, and we found that there are around 15 workflow are missing in the new assembly except 1. After further investigations,

1- The non-missing workflows: Are extending CodeActivity class directly.

2- The 15 missing workflows: Are extending BaseCodeActivity Class (an abstract class that extends CodeActivity class)

So, is there any change in the way Dynamic CRM deal with workflows/plugins? Is this a correct behavior?

Regards,

Asif

Error Details:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.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">
<ActivityId>839f91a2-ef6d-4743-a0bb-2476a357f411</ActivityId>
<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>2018-07-05T14:20:03.6333288Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>839f91a2-ef6d-4743-a0bb-2476a357f411</ActivityId>
<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>2018-07-05T14:20:03.6333288Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<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()

  • RE: Cant deploy workflows after Upgrade to CRM 365

    Thank you all for the answers. 

    Non of them is working...Everything seems was working fine  and to be honest we never tried to update this assembly after that developer left. 

    However, will try to figure it and update this with what might have been the problem.

    Thanks

    Asif

  • G Kawinski Profile Picture
    G Kawinski 380 on at
    RE: Cant deploy workflows after Upgrade to CRM 365

    Are the classes Public?  That's burned me a couple times.  You can also try extracting the DLLs and decompiling them, cause it sounds like it may not be in sync with what is in the source code repository.  

  • Suggested answer
    Tomas Prokop Profile Picture
    Tomas Prokop 590 on at
    RE: Cant deploy workflows after Upgrade to CRM 365

    Hi, what are the versions of plugin assemblies? You get this error if you try to update the assembly with build number that has different major or minor version. 

    https://msdn.microsoft.com/en-us/library/gg309620.aspx?f=255&mspperror=-2147217396#Anchor_4

    1) Right click the project in Visual Studio and select Properties.

    2) Click Assembly Information

    3) Check first two numbers in Assembly version

    4) Compare with first two numbers of version in Plugin Registration Tool

    PluginRegistration_5F00_2018_2D00_07_2D00_06_5F00_19_2D00_06_2D00_31.png

    If they don't match you have to register it as a new assembly.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Cant deploy workflows after Upgrade to CRM 365

    Hi,

    could be your old developer using ilmerge to merge the dll.

    I would recommend you to use the plugin registration tool, open source and destination environment, and look for the missing workflows activity in source environment or extra workflows activity in destination environment.

  • RE: Cant deploy workflows after Upgrade to CRM 365

    Thank you @Wei,

    Sorry I wasn't clear in my question. The problem is in the 15 workflow that it says they are missing.

    They exist in the assembly however CRM does not like them because they don't inherit directly from CodeActivity class (I am assuming that because they didn't show up in  Delta Plugins tool).  So, I was wondering if this is a new thing or there is something else I have to look for.

    Regards,

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Cant deploy workflows after Upgrade to CRM 365

    Hi,

    this is correct behavior, if there is a mismatch amount of file between two servers, you cant import them. So, to correct it, include all the necessary files, build it and update the workflow again.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans