MissingMethodException when running on mono with newer Newtonsoft.Json
See original GitHub issueThis 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:
- Created 4 years ago
- Comments:13 (13 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Pulled it down and can confirm this has fixed it 😄 Nice one
That would be amazing, in the meantime if I figure out anything more I’ll let you know 😃