I am trying to compile a program that uses the Newtonsoft.Json.dll library with mono
Compile team
gmcs Program.cs etcetera.cs -r:Newtonsoft.Json.dll -r:Argotic.Core.dll
Result:
Missing method .ctor in assembly Newtonsoft.Json.dll, type System.Runtime.Versioning.TargetFrameworkAttribute Can't find custom attr constructor image: Newtonsoft.Json.dll mtoken: 0x0a000053
And then when you try to run the program ( mono Program.exe ), it gives an error:
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'Newtonsoft.Json'. at my_program.CJSONStuff.serialize (System.Collections.Generic.Dictionary`2 obj) [0x00000] in <filename unknown>:0 at my_program.TheObjDB.getAllSerialized () [0x00000] in <filename unknown>:0 at my_program.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'Newtonsoft.Json'. at my_program.CJSONStuff.serialize (System.Collections.Generic.Dictionary`2 obj) [0x00000] in <filename unknown>:0 at my_program.TheObjDB.getAllSerialized () [0x00000] in <filename unknown>:0 at my_program.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
I have never used mono before, and I have no idea what is happening .. but maybe it means that the DLL cannot be used because it has not been compiled with mono? If this is the case; does this mean that I cannot use any 3D mono DLLs if I also do not have the source code?
json c # mono
natli
source share