Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Delete Plugin Error

(5) ShareShare
ReportReport
Posted on by 25

Hello everyone,

I created a plugin and deployed it using XrmToolBox in the Test environment. It worked fine there.

Now, we need to delete this plugin, but it's not allowing us to delete it.

Just to note, the same plugin works fine in another environment with the same Dataverse version and environment type.

I tried to delete it from different places (like Plugin Registration Tool and within the solution), but nothing worked.
Now I’m also unable to add a step to the uploaded plugin in this environment.

I’m getting an error when I try to delete the plugin.

 
 
 
 
and when i try to delete the dependency he give me : 
 
 
 
 
And the error I got in XrmToolBox looks like this:
 
Unhandled Exception: System.ServiceModel.FaultException
Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.

Server stack trace: 
   Ã  System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   Ã  System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   Ã  System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   Ã  System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]: 
   Ã  Microsoft.Xrm.Tooling.Connector.CrmServiceClient.Delete(String entityName, Guid id)
   Ã  Xrm.Sdk.PluginRegistration.Helpers.RegistrationHelper.Unregister(CrmOrganization org, ProgressIndicator prog, CrmTreeControl treeControl)
   Ã  Xrm.Sdk.PluginRegistration.MainControl.toolUnregister_Click(Object sender, EventArgs e)
Detail: 
<OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ActivityId>5c54a236-c524-4ae0-8810-6c53efb48281</ActivityId>
  <ErrorCode>-2147220891</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.Xrm.Sdk.InvalidPluginExecutionException: Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'. ---&gt; Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'. ---&gt; System.MissingMethodException: Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.SyncEvents.CommonServiceProvider.ConfigureServicesAndGetServiceProvider()
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.SyncEvents.CommonServiceProvider..ctor(IServiceProvider cdsServiceProvider)
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPluginServiceFactory.Create(IServiceProvider cdsServiceProvider)
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPreDeletePlugin.SyncCdsToExternalComponentChange(IPluginExecutionContext pluginContext, EntityReference sdkMessageProcessingStepEntityReference, IServiceProvider serviceProvider)
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPreDeletePlugin.&lt;&gt;c__DisplayClass4_0.&lt;Execute&gt;b__0()
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties)
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
   --- End of inner exception stack trace ---
   --- 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>
    <KeyValuePairOfstringanyType>
      <a:key>ApiStepKey</a:key>
      <a:value i:type="b:guid" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/">c0cabb1b-ea3e-db11-86a7-000a3a5473e8</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>ApiDepthKey</a:key>
      <a:value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">1</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>ApiActivityIdKey</a:key>
      <a:value i:type="b:guid" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/">5c54a236-c524-4ae0-8810-6c53efb48281</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>ApiPluginSolutionNameKey</a:key>
      <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">System</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>ApiStepSolutionNameKey</a:key>
      <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">System</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>ApiExceptionCategory</a:key>
      <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">ClientError</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>ApiExceptionMessageName</a:key>
      <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">IsvAborted</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>ApiExceptionHttpStatusCode</a:key>
      <a:value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">400</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>OperationStatus</a:key>
      <a:value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">0</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>SubErrorCode</a:key>
      <a:value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">-2146233088</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>Plugin.PluginTrace</a:key>
      <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">[Microsoft.Dynamics.BCVirtualEntity.Plugins: Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPreDeletePlugin]
[c670d658-a917-47ce-9df9-d12ba024f658: Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPreDeletePlugin: Delete of SdkMessageProcessingStep]
</a:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <HelpLink i:nil="true" />
  <Message>Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.</Message>
  <Timestamp>2025-04-18T12:47:52.95492Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault>
    <ActivityId>5c54a236-c524-4ae0-8810-6c53efb48281</ActivityId>
    <ErrorCode>-2147220891</ErrorCode>
    <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
      <KeyValuePairOfstringanyType>
        <a:key>OperationStatus</a:key>
        <a:value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">0</a:value>
      </KeyValuePairOfstringanyType>
      <KeyValuePairOfstringanyType>
        <a:key>SubErrorCode</a:key>
        <a:value i:type="b:int" xmlns:b="http://www.w3.org/2001/XMLSchema">-2146233088</a:value>
      </KeyValuePairOfstringanyType>
    </ErrorDetails>
    <HelpLink i:nil="true" />
    <Message>Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.</Message>
    <Timestamp>2025-04-18T12:47:52.95492Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil="true" />
    <InnerFault>
      <ActivityId>5c54a236-c524-4ae0-8810-6c53efb48281</ActivityId>
      <ErrorCode>-2147220970</ErrorCode>
      <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <HelpLink i:nil="true" />
      <Message>System.MissingMethodException: Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.SyncEvents.CommonServiceProvider.ConfigureServicesAndGetServiceProvider()
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.SyncEvents.CommonServiceProvider..ctor(IServiceProvider cdsServiceProvider) +0x6
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPluginServiceFactory.Create(IServiceProvider cdsServiceProvider) +0x7
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPreDeletePlugin.SyncCdsToExternalComponentChange(IPluginExecutionContext pluginContext, EntityReference sdkMessageProcessingStepEntityReference, IServiceProvider serviceProvider) +0x2e
   at Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPreDeletePlugin.&lt;&gt;c__DisplayClass4_0.&lt;Execute&gt;b__0() +0x60
   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action, IEnumerable`1 additionalCustomProperties) +0x90
   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action) +0x13
   at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) +0x392
   at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) +0x3b: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #135E8224</Message>
      <Timestamp>2025-04-18T12:47:52.95492Z</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" />
  </InnerFault>
  <OriginalException i:nil="true" />
  <TraceText>
[Microsoft.Dynamics.BCVirtualEntity.Plugins: Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPreDeletePlugin]
[c670d658-a917-47ce-9df9-d12ba024f658: Microsoft.Dynamics.BCVirtualEntity.Plugins.CdsToBcSync.SdkMessageProcessingStep.SdkMessageProcessingStepPreDeletePlugin: Delete of SdkMessageProcessingStep]
</TraceText>
</OrganizationServiceFault>
  • Verified answer
    MOHAMED KHIAR Profile Picture
    25 on at
    Delete Plugin Error

    Hello everyone,

    After discussing with Microsoft technical support, they informed me that a re-deployment was carried out to resolve the issue. They received a high number of complaints on this topic.

    The problem is now resolved, and everything is functioning correctly.

    Thank you all for your support!

  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    7,336 Super User 2025 Season 1 on at
    Delete Plugin Error
    Hello Mohamed Khiar,
     

    The error message "Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'" strongly indicates an assembly version mismatch within your Dynamics 365 environment.

    Specifically, it seems that a component, likely related to the Business Central Virtual Entity feature (Microsoft.Dynamics.BCVirtualEntity.Plugins), is trying to use a version of the Microsoft.Extensions.DependencyInjection library that is not available or is an older version in your affected environment.

    Here's a breakdown of why this might be happening and how to troubleshoot and potentially resolve it:

    Likely Cause: Assembly Version Conflict

    • Business Central Virtual Entity Dependency: The error stack trace clearly points to the Business Central Virtual Entity plugins. These plugins likely have a dependency on the Microsoft.Extensions.DependencyInjection library.

    • Version Mismatch: It's highly probable that the version of this dependency that the Business Central Virtual Entity components in your problematic environment are expecting is different from the version that is actually available at runtime.

    • Inconsistent Deployment: This inconsistency could have arisen during a past update, a failed deployment of another solution, or some other background process that affected the underlying assembly versions.

    • Why it Works Elsewhere: The fact that it works in other environments suggests that those environments have the correct and consistent versions of the necessary assemblies.


    •  

    Troubleshooting and Resolution Steps:

    1. Identify the Root Cause (Challenging without direct server access):

      • Check Installed Solutions: Review the solutions installed in your problematic environment for any that might be related to Business Central or virtual entities. Look for their versions. Compare these versions with the working environment.

      • Examine Deployment History: If available, review the deployment history of your problematic environment for any recent updates or installations that might have introduced assembly changes.

      •  

    2. Potential Resolution Strategies (Likely Requiring Administrator Intervention):

      • Environment Update/Patch: The most likely and recommended solution is to ensure your problematic Dynamics 365 environment is on the exact same cumulative update version as your working environments. This will ensure that all system components, including the Business Central Virtual Entity feature and its dependencies, are at the correct and consistent versions.

         

        • How to Check Version: Go to Settings > About in both the problematic and working environments to compare the version numbers.

        • How to Update: If the versions are different, you will need to schedule an update for the problematic environment through the Power Platform Admin Center.

      • Investigate Business Central Integration: Even if you're not actively using Business Central Virtual Entities, the components might be installed by default. Check if there are any configurations or connections related to Business Central in your problematic environment that might be triggering the use of these plugins.

      • Manual Assembly Deployment (Potentially Risky and Not Recommended Unless You Have Deep Understanding): In very specific and controlled scenarios, if you could identify the exact missing or mismatched assembly, you might consider manually deploying the correct version to the Dynamics 365 server. However, this is a complex and potentially risky operation that could destabilize your environment if not done correctly. It's strongly advised to avoid this unless guided by Microsoft Support.

      • Contact Microsoft Support: Given that this is a system-level assembly issue, the most reliable way to resolve it might be to open a support ticket with Microsoft. Provide them with the error details, the fact that it works in other environments, and the steps you've already taken. They have deeper access to the environment's configuration and logs and can guide you on the necessary steps to resolve the assembly mismatch.

          



    3.  

    Why This Prevents Deletion/Step Modification:

    The error occurs within a Business Central Virtual Entity plugin that is triggered during the deletion or modification of plugin steps (SdkMessageProcessingStep). Because this core component is failing due to the assembly mismatch, any operation that relies on it (like deleting the plugin or its steps) will also fail.

    In summary, the "Method not found" error points to an inconsistent assembly version related to the Business Central Virtual Entity feature in your problematic Dynamics 365 environment. The most effective way to resolve this is likely to ensure the environment is on the same cumulative update version as your working environments. If that doesn't resolve it, contacting Microsoft Support is the best course of action.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Suggested answer
    Tom_Gioielli Profile Picture
    1,543 on at
    Delete Plugin Error
    Just verifying that the plugin has been disabled in your environment prior to trying to delete, right? Is it in a managed solution at all?
  • MOHAMED KHIAR Profile Picture
    25 on at
    Delete Plugin Error
    • This plugin originally worked fine in this environment, and it is still running without any issues. However, we are unable to delete it or remove any steps inside it.

    • The plugin also works correctly in other environments, and I haven’t encountered any problems there.

    • I didn’t find any differences between this environment and the others.

    • I’m unable to update the plugin — the issue always appears when working with the steps. I can’t create, delete, or modify any step. However, I am able to update the plugin assembly itself.


    •  
     
     
     
  • Suggested answer
    Holly Huffman Profile Picture
    6,078 on at
    Delete Plugin Error
    Good morning, afternoon, or evening depending on your location!
     
    The error logs indicate two primary concerns:
    1. Method Not Found Issue: The plugin assembly relies on the BuildServiceProvider method from Microsoft.Extensions.DependencyInjection, which seems to be missing or incompatible in the current environment.
    2. Dependencies Preventing Deletion: The plugin assembly appears to have dependencies, such as steps or images, that must be removed before it can be deleted.
    Proposed Steps to Resolve:
    1. Verify Plugin Assembly Dependencies:
      • Ensure the assembly includes all necessary libraries and dependencies, specifically Microsoft.Extensions.DependencyInjection. We will confirm compatibility with the environment.
    2. Recompile Plugin:
      • Rebuild and redeploy the plugin assembly using the appropriate .NET framework version to resolve the missing method issue.
    3. Review Environment Configuration:
      • Compare the Test environment with other environments where the plugin works fine to identify any discrepancies.
    4. Remove Dependencies:
      • Use the Plugin Registration Tool to remove any steps or images associated with the plugin assembly to facilitate deletion.
    5. Enable Tracing:
      • Activate plugin tracing to gather detailed logs for further analysis.
     
    Hope this helps some!

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 149 Super User 2025 Season 1

#2
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 53 Super User 2025 Season 1

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 32 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans