"Does not contain definition" error when trying to call a specific static method in Json.NET

I'm on the latest beta version of LINQPad 5 (v5.09.04) and I was trying to call the static method Newtonsoft.Json.JsonSerializer.CreateDefault() from the Json.NET NuGET package (9.0.1). I get an error that it does not contain a definition for CreateDefault.


So, I looked at the version being used.


I then dropped the assembly into ILSpy to verify that the method does exist.


I then tried another static method, Create(), which LINQPad doesn't complain about. I was confused at this point so I installed LINQPad 4 and pulled the same Json.NET nuget packages and it works fine. I compared the Json.NET assemblies and they are the same. In LINQPad 5 I next tried changing the supportedRuntime setting in the App.config to see if that had any effect, but it didn't.

I'm sure that I have missed something, but I just can't think of what it could be.


Sign In or Register to comment.