Error while trying to connect to D365 v9.x via console app

question_mark_png57Lately, I noticed that I started to get errors while trying to connect v9.x organizations via console applications that were using OrganizationServiceProxy. Everything was set up just as it was usually working, but with new SDK it seems that it’s not.

The code below was just not working with all the right parameters sent to the constructor

Image 266.png

Here is the error that was popping out:

'Metadata contains a reference that cannot be resolved: 'https://.crm.dynamics.com/XRMServices/2011/Organization.svc?wsdl&sdkversion=90'.'

After a research and downloading the Microsoft.CrmSdk.CoreAsseblies NuGget package nothing useful was found, but since new versions of D365 Online have a support for .NET v4.6 framework I have updated my project to that version of the framework.

Since then error mentioned above was not present anymore while using Visual Studio 2017. I hope that this info will save you some time you will face the issue above.

TLDR: Update your console app project to .NET Framework v4.6!