Connecting to Dynamics 365 v9 “metadata reference cannot be resolved” issue fix
Introduction:
In the blog we will be discussing about the error while connecting to Dynamics 365 version 9 using console app.
Implementation:
In our example we will show how to connect to Dynamics 365 using a Console app in v 8.2 and when the same code is used to connect to version 9 we get an error. We will also discuss about how to resolve the issue
Step 1: The code show below is used to connect to Dynamics 365 version 8.2 using Console App.
Step 2: When we run the above code, we get the following output.
Step 3: Now we change the credentials and try connecting to Dynamics 365 v 9 with the same code, we get the following error.
Step 4: To solve this issue there are two ways, in the first method, set the Target framework to “.NET Framework 4.6.2 or above”.
Step 5: After changing the target version build the solution again and run the app.The connection to Dynamics 365 version 9 environment will be successful.
Step 6: The second method is by using the below code before making a connection.
TLS stands for “Transport Layer Security,” and is a protocol that is an industry standard designed to protect the privacy of information communicated over the Internet.