Home

Newtonsoft JSON.NET issues with LINQPad (4.55.03 AnyCPU)

Greets,

I have used NuGet within to get the latest version of Newtonsoft's JSON.NET (7.0.0.0 Beta 3). However, when attempting to use SelectTokens() from the JToken object, it doesn't seem to recognize the method. I get the error 'Newtonsoft.Json.Linq.JToken' does not contain a definition for SelectTokens' and no extension method 'SelectTokens' accepting a first argument of type 'Newtonsoft.Json.Linq.JToken' could be found'.

I have verified the version of the NuGet package, ensured all namespaces were included and I've even tried adding a reference to the Newtonsoft.Json.dll directly, however, to no avail.

Is there perhaps something that I am doing incorrectly or need to change in order for LINQPad to be able to see the types correctly?

Thank you in advance!

Comments

  • No need to look further, I found the issue. Apparently I had created a "Plugins" folder for LinqPad to directly add all of the common 3rd party assemblies that I use all the time and I still had a reference to the older version of Newtonsoft.JSON in the plugins folder.

    Apparently the assemblies in this folder trump any of the ones that you reference for the query directly, that was my goof. I updated that version and everything seems much, much better.
Sign In or Register to comment.