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.
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)
à 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)
<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)'. ---> Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Method not found: 'System.IServiceProvider Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)'. ---> 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.<>c__DisplayClass4_0.<Execute>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.<>c__DisplayClass6_0.<RunStep>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.<>c__DisplayClass4_0.<Execute>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]
</OrganizationServiceFault>