wadewegner / Force.com-Toolkit-for-NET

The Force.com Toolkits for .NET provides an easy way for .NET developers to interact with the Force.com & Chatter REST APIs using native libraries.
BSD 3-Clause "New" or "Revised" License
374 stars 396 forks source link

Could not lod file or assembly after updating Newtonsoft.Json from 11.0.2 to 12.0.3 #408

Open vGreatv opened 2 years ago

vGreatv commented 2 years ago

Hello everyone,

I have problem with updating Newtonsoft.Json from 11.0.2 to 12.0.3. I am using DeveloperForce.Force 2.0.7 and required Newtonsoft.Json is >= 11.0.2. I think there is some problem with Salesforce.Common.

Calling kit: Salesforce.Common, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 9f7864e53fb79388. LOG: reference after applying policy: Newtonsoft.Json, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed WARNING: Comparing assembly name resulted in a major version mismatch ERROR: Unable to complete the installation of the kit (hr = 0x80131040). Polling complete.

Could not load file or assembly 'Newtonsoft.Json, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed' or one of its dependencies. The localized assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040); System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version = 11.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed' or one of its dependencies. The localized assembly manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
   in Salesforce.Common.AuthenticationClient.<UsernamePasswordAsync>d__27.MoveNext()
   in System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   in Salesforce.Common.AuthenticationClient.UsernamePasswordAsync(String clientId, String clientSecret, String username, String password, String tokenRequestEndpointUrl)