Sunday 10 May 2020

Hi everyone,

Have you encountered "Method not found" error whether when you trying to connect to Plugin Registration Tool, XRM Toolbox, or just to run interactive mode of CRM Connection Control using XRMTooling Connector? This happened to me recently when I tried to connect to CRM using PowerShell to pop up the Connection Control interactive mode. I was trying to deploy my customization to the Dynamics Portal.

Here is the typical error message.
Note: the Method can be vary.

Source : Microsoft.Xrm.Tooling.CrmConnectControl
Method : QueryOnlineServerList
Date : 5/10/2020
Time : 3:34:45 PM
Error : Method not found: 'Microsoft.Xrm.Tooling.Connector.Model.CrmOnlineDiscoveryServer Microsoft.Xrm.Tooling.Connector.Utilities.DeterminDiscoveryDataFromOrgDetail(System.Uri, Boolean ByRef)'.
Stack Trace : at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.QueryOnlineServerList(ObservableCollection`1 svrs, OrganizationDetailCollection col, ClientCredentials liveCreds, Uri trimToDiscoveryUri, Uri globalDiscoUriToUse)
   at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.FindCrmOnlineDiscoveryServer(ClientCredentials liveCreds)
   at Microsoft.Xrm.Tooling.CrmConnectControl.CrmConnectionManager.ValidateServerConnection(CrmOrgByServer selectedOrg)
======================================================================================================================

I was struggling to find out why and keep copying the file in the folder with the latest SDK, however it did not work.

Apparently, the root cause is  the compatibility of the Microsoft.Xrm.Tooling SDK with the tool you are running now or with the Microsoft.Xrm.Sdk.dll.

In my case, no matter how many times I tried to copy and replace, download latest SDK, it did not work.
It is because I have the problematic dll installed in the GAC

Solution:
1. Go to GAC Folder
C:\Windows\Microsoft.NET\assembly\GAC_MSIL

2. Find the dll folder that caused your error, in my case it is Microsoft.Xrm.Tooling

3. Then backup and delete the folder

I guess there is another way to uninstall this GAC dll, but due to limited time and this is just my personal PC, I was choosing the quickest method that is deleting the folder.
After that, I have no issue to run it again.
Be it Plugin Registration Tool, the wonderful XRMToolbox or any other apps, if you encountered the same issue, you can just perform my above solution.
Remember, use it on your own risk.

Thank you and have a great day!

No comments:

Post a Comment

My Name is..