I am trying to connect CRM using Microsoft.Xrm.Tooling.Connector below is my code. it failed on first step only.
I am trying to connect on-prem version of CRM 2016
CrmServiceClient CrmSvc = new CrmServiceClient("AuthType=AD;Url=https://<<ServerName>>/<<ORG_Name>>; Domain=<<Domain>>; Username=<<username>>; Password=<<password>>");
Above code throw below error message.
{"Could not load file or assembly 'Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.18.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.":"Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.18.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"}
I have already Microsoft (windows identity foundation) installed
https://www.microsoft.com/en-us/download/details.aspx?id=17331