Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mono missing System.Numerics.BigInteger.Parse(string,IFormatProvider)

I'm currently getting the following error using the Json.NET/Newtonsoft.JSON library:

Missing method System.Numerics.BigInteger::Parse(string,IFormatProvider) in assembly
/usr/lib/mono/gac/System.Numerics/4.0.0.0__b77a5c561934e089/System.Numerics.dll,
referenced in assembly ~/dev/Mono/Mercury/Mercury/bin/Debug/Newtonsoft.Json.dll

This occurs every time that the Json retrieved from the couchDB database has a numeric value field. I discovered from searching that the method that the library is calling from System.Numerics isn't yet implemented in Mono.

The problem is that Json.NET is a dependency for another library that I'm using (WDK.API.CouchDB [3]).

Is there any way I can circumvent this without tweaking the source of any of the libraries? Any Suggestions?

PS: I'm using Mono 3.0.6 and MonoDevelop 4.0.8, on Linux. I just started learning C# and this is my first project with it. I tried to search the topic on the web with no fruitful result.

Thanks

[3] code.google.com/p/skitsanoswdk

like image 972
eDrago Avatar asked Jun 18 '13 17:06

eDrago


2 Answers

To fix this you can add a reference to System.Numerics and then set its property Copy Local to true.

like image 133
Răzvan Flavius Panda Avatar answered Nov 12 '22 22:11

Răzvan Flavius Panda


Use a 4.5 version of Json.NET until Mono fix it.

like image 25
Yogee Avatar answered Nov 13 '22 00:11

Yogee