question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with Newtonsoft.Json dependency

See original GitHub issue

Description

I’m trying to use this library and I’m having the following issue:

The type provider ‘FSharp.Data.GraphQL.Client.GraphQlProvider’ reported an error: Could not load file or assembly ‘Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The system cannot find the file specified.

The paket.lock file says I have version Newtonsoft.Json (11.0.2) installed. I’m using the latest Fable.Compiler (1.3.17) which has a dependency on version 11.0.1 or later of Newtonsoft.

Repro steps

I added a dependency to this library using Paket in an existing project using the latest version of the Fable.Compiler and tried to open the module:

2018-07-16 12_21_43-window

  • Operating system: Windows 10
  • .NET Runtime, CoreCLR or Mono Version: Target is netstandard2.0, I’m running on .net core 2.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Horusiathcommented, Jul 16, 2018

Tbh. I think, we could drop the json serializers all along. In essence when we construct a GraphQL response, we already produce a full JSON tree representation, that could be encoded as:

type GQLReply = 
    | GQInt     of int
    | GQLFloat  of double
    | GQLString of string
    | GQLBool   of bool
    | GQLNull
    | GQLList   of GQLReply list
    | GQLObj    of struct(string * GQLReply) list

You don’t need an entire JSON.NET to serialize such structure. A simple function can do that, see: https://github.com/Horusiath/Grafs/blob/8cf29fd50dc11ff21bc72c18d4794c009825745d/src/Grafs/Execution.fs#L33

1reaction
iveltencommented, Jul 16, 2018

I agree. We could work at this change ASAP, as this dependency can lead to many issues like that on the provider.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix issue with Newtonsoft.JSON dependency?
Our project uses the latest version of Newtonsoft.Json. When I try to run our project it fails with the following error:
Read more >
Some issue in 13.0.1 manifest for .net 4.0 framework #2658
It seems that some issue is inside the manifest of latest version for .net ... dependencies -- whether some have dependencies on Newtonsoft....
Read more >
Netwontsoft.Json dependency conflicts with Azure Functions ...
Our issue. We encountered the Newtonsoft.Json conflict in our Azure Functions project for background processing (another series to come later) ...
Read more >
Upgrade: Nuget package dependency problem Newtonsoft.Json
This article provides information for addressing a problem occurring during Sitefinity upgrade due to nuget package dependency issue.
Read more >
NuGet package dependency version problem with ...
First of all, the latest version on RestSharp 101.0 is pulling Newtonsoft.Json version 3.5.8 rather than 4.0.1.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found