NewtonSoft Json Dll Type Mismatch Error

Resolution when Invoke workflow fails with: "System exception. The following errors were encountered while processing the workflow tree."

Value of type ‘Newtonsoft.Json.Linq.JObject’ cannot be converted to ‘Newtonsoft.Json.Linq.JObject’. Type mismatch could be due to mixing a file reference to ‘C:\Users{user_id}.nuget\packages\newtonsoft.json\13.0.1\lib\net40\Newtonsoft.Json.dll’ in project ‘vbhost’ with a file reference to ‘C:\Program Files\UiPath\Studio\net461\Newtonsoft.Json.dll’ in project ‘vbhost’. If both assemblies are identical, try replacing these references so both references are from the same location.

Root Cause: Newtonsoft.Json.Linq.JObject file mismatch in the package folder and Studio installation folder.

Resolution:

  1. Copy the Newtonsoft.Json.dll file from the Studio installation folder (Studio\net461)
  2. Paste it into the package folder C:\%users%\.nuget\packages\newtonsoft.json\{folder_With_the_highest_version}\lib\net40.
  3. Choose to replace the file, if prompted by Windows.

1 Like