Skip to main content

Notifications

Service | Customer Service, Contact Center, Fie...
Answered

Unable to remove plugins from D365 CE environment

Posted on by 95
Hi Everyone,
 
We are experiencing some issues with removing plugins from our environments. The Microsoft support department isn't getting us anywhere. So hopefully someone can send us in the right direction.
 
Our situation is as following:
 
Dev/Test environment (unmanaged)
Accept environment (managed)
Production environment (managed)
 
We are currently in a refactoring phase where old plugins are replaced with new ones. The old ones are removed from the unmanaged environment en the new plugins will be registered.
The solution from our test environment is exported as managed en import to our accept environment and then to production if accept is approved. We release the solution as upgrade.
 
How we are used to work is that we need to track which plugins are removed because an upgrade fails when there are plugins removed. All fine we are aware and remove these plugins through the plugin registration tool (PRT) before importing the managed solution.
 
About a month ago the behaviour seems to be changed within our accept/production environments. We are not able to delete plugins through the PRT anymore. 
The solution import/upgrade also fails because there are plugins removed in the source environment and the solution cannot be imported. As you can think of this has huge consequences for our release process. 
 
Our only option is to completely remove the solution which contains the plugin registrations or use an update instead of upgrade but that doesn't clean the removed plugins.
We received some workarounds with increasing major/minor version of the assembly. But this doesn't resolve our issue.
 
The answer I'm looking for is what changed, what happened? It seems that Microsoft changed the system behaviour when importing solutions. We have 8 environments which work with managed solutions. 
Behaviour changed for all environments at the same time, so it isn't related to our own customatizations. I'm working for quiet a while with CE and haven't seen things like this before.
 
If we aren't allowed to remove plugins through the PRT I would expect the upgrade process would take care of the plugin removal process. But it doesn't and that means we are stuck which is highly frustrating because we cannot following the release schedule for our business and not following the release process how we are used to for past years. Hopefully the community has some ideas or understanding what happened. It seems like behaviour around managed plugins have changed.
 
When deleting plugins via the PRT we receive the following error:
 
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The evaluation of the current component(name=SdkMessageProcessingStep, id=e531e528-602f-ed11-9db0-000d3ade25e9) in the current operation (Delete) failed during managed property evaluation of condition: {Managed Property Name: ismanaged}Detail: <OrganizationServiceFault xmlns=/http://schemas.microsoft.com/xrm/2011/Contracts/ xmlns:i=/http://www.w3.org/2001/XMLSchema-instance/>  <ActivityId>4158e575-2287-452d-b812-c297fc789f15</ActivityId>  <ErrorCode>-2147160026</ErrorCode>  <ErrorDetails xmlns:a=/http://schemas.datacontract.org/2004/07/System.Collections.Generic/>    <KeyValuePairOfstringanyType>      <a:key>ApiExceptionSourceKey</a:key>      <a:value i:type=/b:string/ xmlns:b=/http://www.w3.org/2001/XMLSchema/>Plugin/Microsoft.Crm.ObjectModel.SdkMessageProcessingStepService</a:value>    </KeyValuePairOfstringanyType>    <KeyValuePairOfstringanyType>      <a:key>ApiSourceActivityKey</a:key>      <a:value i:type=/b:string/ xmlns:b=/http://www.w3.org/2001/XMLSchema/ />    </KeyValuePairOfstringanyType>    <KeyValuePairOfstringanyType>      <a:key>ApiExceptionOwnerKey</a:key>      <a:value i:type=/b:string/ xmlns:b=/http://www.w3.org/2001/XMLSchema/>OwnershipNotFoundInExceptionOwnerSettings</a:value>    </KeyValuePairOfstringanyType>    <KeyValuePairOfstringanyType>      <a:key>ApiOriginalExceptionKey</a:key>      <a:value i:type=/b:string/ xmlns:b=/http://www.w3.org/2001/XMLSchema/>Microsoft.Crm.CrmException: The evaluation of the current component(name=SdkMessageProcessingStep, id=e531e528-602f-ed11-9db0-000d3ade25e9) in the current operation (Delete) failed during managed property evaluation of condition: {Managed Property Name: ismanaged} ---&gt; Microsoft.Crm.CrmException: The evaluation of the current component(name=SdkMessageProcessingStep, id=e531e528-602f-ed11-9db0-000d3ade25e9) in the current operation (Delete) failed during managed property evaluation of condition: {Managed Property Name: ismanaged}   at Microsoft.Crm.ObjectModel.SdkEntityServiceBase.ValidateManagedProperty(BusinessEntityMoniker moniker, ExecutionContext context)   at Microsoft.Crm.ObjectModel.SdkMessageProcessingStepServiceInternal`1.DeleteInternal(BusinessEntityMoniker moniker, ExecutionContext context, Boolean verifySku, Boolean checkInternalStage, IBusinessEntity existingStep)   at Microsoft.Crm.ObjectModel.SdkMessageProcessingStepServiceInternal`1.Delete(BusinessEntityMoniker moniker, ExecutionContext context)   --- End of inner exception stack trace ---   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)   at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass6_0.&lt;RunStep&gt;b__0()</a:value>    </KeyValuePairOfstringanyType>
 
 
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The evaluation of the current component(name=SdkMessageProcessingStepImage, id=3bda2590-4c20-ee11-9966-002248993928) in the current operation (Delete) failed during managed property evaluation of condition: {Managed Property Name: ismanaged}Detail: <OrganizationServiceFault xmlns=/http://schemas.microsoft.com/xrm/2011/Contracts/ xmlns:i=/http://www.w3.org/2001/XMLSchema-instance/>  <ActivityId>50b1ed30-76a3-4036-90c1-7c1d2699ac82</ActivityId>  <ErrorCode>-2147160026</ErrorCode>  <ErrorDetails xmlns:a=/http://schemas.datacontract.org/2004/07/System.Collections.Generic/>    <KeyValuePairOfstringanyType>      <a:key>ApiExceptionSourceKey</a:key>      <a:value i:type=/b:string/ xmlns:b=/http://www.w3.org/2001/XMLSchema/>Plugin/Microsoft.Crm.ObjectModel.SdkMessageProcessingStepImageService</a:value>    </KeyValuePairOfstringanyType>    <KeyValuePairOfstringanyType>      <a:key>ApiSourceActivityKey</a:key>      <a:value i:type=/b:string/ xmlns:b=/http://www.w3.org/2001/XMLSchema/ />    </KeyValuePairOfstringanyType>    <KeyValuePairOfstringanyType>      <a:key>ApiExceptionOwnerKey</a:key>      <a:value i:type=/b:string/ xmlns:b=/http://www.w3.org/2001/XMLSchema/>OwnershipNotFoundInExceptionOwnerSettings</a:value>    </KeyValuePairOfstringanyType>    <KeyValuePairOfstringanyType>      <a:key>ApiOriginalExceptionKey</a:key>      <a:value i:type=/b:string/ xmlns:b=/http://www.w3.org/2001/XMLSchema/>Microsoft.Crm.CrmException: The evaluation of the current component(name=SdkMessageProcessingStepImage, id=3bda2590-4c20-ee11-9966-002248993928) in the current operation (Delete) failed during managed property evaluation of condition: {Managed Property Name: ismanaged} ---&gt; Microsoft.Crm.CrmException: The evaluation of the current component(name=SdkMessageProcessingStepImage, id=3bda2590-4c20-ee11-9966-002248993928) in the current operation (Delete) failed during managed property evaluation of condition: {Managed Property Name: ismanaged}   at Microsoft.Crm.ObjectModel.SdkEntityServiceBase.ValidateManagedProperty(BusinessEntityMoniker moniker, ExecutionContext context)   at Microsoft.Crm.ObjectModel.SdkMessageProcessingStepImageServiceInternal`1.DeleteInternal(BusinessEntityMoniker moniker, ExecutionContext context, Boolean verifySku)   --- End of inner exception stack trace ---   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)   at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)   at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass6_0.&lt;RunStep&gt;b__0()</a:value>    </KeyValuePairOfstringanyType>
 
 
 
  • Suggested answer
    OG-OG Profile Picture
    OG-OG 12 on at
    Unable to remove plugins from D365 CE environment
    @scosec, It seems I'm still able to unregister a plugin in a managed assembly. However, it is not possible to bump the major nor minor version of the assembly and just update it as I get an error in PRT if I do this (on the DEV environment with the unmanaged assembly)
     
    The error is Plugin Assembly fully qualified name has changed from: [REDACTED, 1, 0, neutral, REDACTED] to: [REDACTED, 1, 1, neutral, REDACTED]</Message>
     
    So for the moment it looks like the way to do this is by removing the plugin manually in the managed assembly before deploying to that environment.
  • Verified answer
    Scosec Profile Picture
    Scosec 95 on at
    Unable to remove plugins from D365 CE environment
    An update for other users.
     
    Microsoft has made changes. When a plugin assembly is registered as managed it won't be possible in the future te remove plugins (steps) through the PRT.
    As I understood from support it has to be done by changing the plugin assembly version by major or minor. Then the import should understand plugins are allowed to be removed.
    Our testcases so far didn't work.
     
    Currently we removed plugins in the destination environment if they where removed from the source solution. Otherwise the solution install would fail.
     
    Due to many customer complaints the change has been reverted for EU region for now. But at some point it will not be allowed anymore to remove managed plugin(steps) through the PRT.
    When the make this change they will come with some form of documentation support told me.
     
    Hopefully it helps some.
  • l.oliver Profile Picture
    l.oliver 36 on at
    Unable to remove plugins from D365 CE environment
    We're having this exact issue!
     
    As an ISV provider we are having our CE product deployed to multiple customers.
     
    In development we have our Dev env (unmanaged) and our test env (managed).
    Now and then when we develop/working on a release it can happen that we create an unnecessary plugin that we need to remove again. If this plugin exists in our assembly on our dev env for more than 1 day, it will get deployed as part of our CE solution to our Test Env as a managed solution (using DevOps Pipelines).
     
    Earlier it was possible to directly disable the unnecessary plugin in our test env and remove it with the next deployment from dev. This is not the case anymore and we're now getting the above mentioned error.
     
    Another question, what happens if a plugin gets into a final release of our CE solution and then gets deployed to our customers environments as part of a version update and we want to depricate/remove that plugin at a later stage? How should that be handled? Right now, it seems that anything part of our "released" plugin assembly can NEVER be edited/deleted. Is that true?

    @Scosec, any news from the MS support on this?
  • Scosec Profile Picture
    Scosec 95 on at
    Unable to remove plugins from D365 CE environment
    Just an update for as far as I have information now.
     
    In the past it was possible to remove managed plugin steps through the PRT.  Microsoft has changed this behaviour where it is not allowed anymore to remove plugins steps from a managed solution in the PRT.
     
    I'm in contact with support for resolution. I'll update the post when I have more information.
  • Scosec Profile Picture
    Scosec 95 on at
    Unable to remove plugins from D365 CE environment
    Hi,
     
    Thanks for your reply.
     
    As I understand the message this relates to plugins created by Microsoft. So the default plugins installed and managed by Microsft.
    The plugins/steps we are trying to unregister are from our own assemblies. So unrelated to the Microsoft ones.

    But it might be interesting because there could be a correlation between the issue and the post.
  • Haig Liu Profile Picture
    Haig Liu Microsoft Employee on at
    Unable to remove plugins from D365 CE environment
    Hi,
     
    This may have something to do with one of the PRT changes:

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,963 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans