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.

MissingMethodException when running on mono with newer Newtonsoft.Json

See original GitHub issue

This is quite an exotic setup I know, but this has my tests failing in CI, so I’ll be looking into this too.

I have an example here: https://github.com/justeat/httpclient-interception/commit/a776327d8c1de00e7ad2037e896c171c91c239f6#diff-ad2944e2db1bf6a75b8602f406da7846R13

When running under mono, if I call .WithJsonContent(... then it pops with a runtime exception:

Error Message:
   System.MissingMethodException : Method not found: JustEat.HttpClientInterception.HttpRequestInterceptionBuilder JustEat.HttpClientInterception.HttpRequestInterceptionBuilderExtensions.WithJsonContent(JustEat.HttpClientInterception.HttpRequestInterceptionBuilder,object,Newtonsoft.Json.JsonSerializerSettings)

In recreating this, I discovered that it’s not an issue if you are referencing Newtonsoft.Json 9.0.1, but if you reference a higher version such as 12.x then this issue pops up.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
slang25commented, Aug 4, 2019

Pulled it down and can confirm this has fixed it 😄 Nice one

1reaction
slang25commented, Jul 4, 2019

That would be amazing, in the meantime if I figure out anything more I’ll let you know 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

MissingMethodException when running on mono with ...
In recreating this, I discovered that it's not an issue if you are referencing Newtonsoft.Json 9.0.1, but if you reference a higher version...
Read more >
MissingMethodException with Newtonsoft.Json when using ...
Here is my Json-related code: var settings = new JsonSerializerSettings() { TypeNameHandling = TypeNameHandling.Objects, Formatting = Formatting ...
Read more >
Frequent 'missingmethodexception' Questions
MissingMethodException with Newtonsoft.Json when using TypeNameAssemblyFormat with PCLs. Is there a problem with using the TypeNameAssemblyFormat with PCLs?
Read more >
JSON Newtonsoft Error? Help!
Trying to build my project and get the following error when running the build: Mono path[0] =...
Read more >
Bug in Visual studio 2022 + Xamarin + SignalR (method ...
by using this simple code, it doesn't run, but, if i just run the same project in ... MissingMethodException: 'Method not found: int...
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