Shane Bartholomeusz

Geek and lover of all things tech related

Fix: Unable to Uninstall CRM Profiler

Problem

While trying to debug a new custom workflow plugin in my Dynamics 365 environment I encountered the below error.CRM Profiler Error

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Type: ProfiledTypes.ProfilerTypeace22df1b6e34c4291478707064a0607 ;
Detail: 
  c823fdbf-9ca2-44d0-812d-326fb937e043
  -2147204725
  
  Type: ProfiledTypes.ProfilerTypeace22df1b6e34c4291478707064a0607 ;
  2018-07-17T13:49:53.024167Z
  false
  
    c823fdbf-9ca2-44d0-812d-326fb937e043
    -2147204725
    
    Type: ProfiledTypes.ProfilerTypeace22df1b6e34c4291478707064a0607 ;
    2018-07-17T13:49:53.024167Z
    false

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 PluginProfiler.Library.ProfilerManagementUtility.CreateWorkflowAssembliesAndTypes(CrmServiceClient service, ActivityAssemblyCompilerConfiguration configuration, Dictionary`2 types, OptionSetValue isolationMode, DateTime lastModified, IEnumerable`1 mappedAssemblies)
   at PluginProfiler.Library.ProfilerManagementUtility.InstrumentWorkflowSteps(CrmServiceClient service, Guid workflowId, String keyFileName, CustomActivityStep[] workflowSteps)
   at PluginProfiler.Library.ProfilerManagementUtility.EnableWorkflow(CrmServiceClient service, String overrideKeyFileName, Guid workflowId, Boolean persistToEntity, String persistenceSessionKey, Boolean includeSecureInformation, Boolean isContextReplay, CustomActivityStep[] workflowSteps)
   at Microsoft.Crm.Tools.PluginRegistration.CommonControls.ProfilerSettingsViewModel.btnOk_Click()

Hmmmm strange …. so I tried reinstalling my custom assembly … no luck ….

Then I tried reinstalling the CRM Profiler but I encountered the below error when trying to uninstall it.

CRM Uninstall Profiler Screenshot

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Solution dependencies exist, cannot uninstall.DependencyCount : 1
RequiredComponentObject details: Id : 3172f5bf-b8d4-4822-b6fe-96d5df0c4c0d, Type : Entity, ParentId : 00000000-0000-0000-0000-000000000000, DependentComponentObject details : ObjectName : , Id : 98d5a09a-f833-e711-810f-c4346bc4de40, Type : SiteMap, ParentComponentDisplayName : 
Detail: 
  e3090a90-40d5-4f3a-802f-a1ce25fa2fbb
  -2147160035
      componentType
      SiteMap,
  Solution dependencies exist, cannot uninstall.DependencyCount : 1
RequiredComponentObject details: Id : 3172f5bf-b8d4-4822-b6fe-96d5df0c4c0d, Type : Entity, ParentId : 00000000-0000-0000-0000-000000000000, DependentComponentObject details : ObjectName : , Id : 98d5a09a-f833-e711-810f-c4346bc4de40, Type : SiteMap, ParentComponentDisplayName : 
  2018-07-17T13:52:40.8213287Z
  false
    e3090a90-40d5-4f3a-802f-a1ce25fa2fbb
    -2147160035
    Solution dependencies exist, cannot uninstall.DependencyCount : 1
RequiredComponentObject details: Id : 3172f5bf-b8d4-4822-b6fe-96d5df0c4c0d, Type : Entity, ParentId : 00000000-0000-0000-0000-000000000000, DependentComponentObject details : ObjectName : , Id : 98d5a09a-f833-e711-810f-c4346bc4de40, Type : SiteMap, ParentComponentDisplayName : 
    2018-07-17T13:52:40.8213287Z
    false

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 PluginProfiler.Library.ProfilerManagementUtility.UninstallProfiler(CrmServiceClient service)
   at Microsoft.Crm.Tools.Libraries.OrganizationHelper.UninstallProfiler(CrmOrganization org)
   at Microsoft.Crm.Tools.PluginRegistration.OrganizationControlViewModel.<>c__DisplayClass27.b__1b(Object o, DoWorkEventArgs e)

Solution

It turns out that the CRM Profiler had references to the Sitemap which had to be removed. The solution was to remove the Plugin-Profiles entry in the Sitemap.

Following this I was able to successfully uninstall/reinstall the CRM Profiler which ultimately solved my issue – I was able to finally debug my custom workflow plugin yay!

CRM Sitemap Screenshot

Shane Bartholomeusz

4 Comments

  1. That solved my issue. Thanx.

  2. MR A J CHILDS

    1st May 2019 at 3:51 am

    It worked, superstar!

  3. Thanks for your help. This post help me to resolve my issue

  4. Thank you..it solved my issue too…

Leave a Reply

© 2024 Shane Bartholomeusz

Theme by Anders NorenUp ↑