[MonoTouch] System.MissingMethodException: Method not found: 'System.Type.op_Equality'.

Rolf Bjarne Kvinge rolf at xamarin.com
Fri Oct 28 03:48:51 EDT 2011


Hi,

smcs compiles referencing MonoTouch' class libraries instead of the
desktop class libraries. If you reference the desktop class libraries
when compiling you might end up referencing methods that don't exist
in MonoTouch (such as System.Type.op_Equality).

Rolf

On Fri, Oct 28, 2011 at 1:28 AM, ayoung <andrewdyoung at gmail.com> wrote:
> json.net won't work on MonoTouch without some precompiler magic. Here's 4.0
> r3 for MonoTouch https://github.com/ayoung/Newtonsoft.Json.
> Sebastien, is there some light reading on what smcs does? I did a quick
> search on the internets but didn't find much.
>
> On Thursday, October 27, 2011 at 12:02, Sebastien Pouliot [via MonoTouch]
> wrote:
>
> Hello,
>
> Just rebuild Json.NET 4.0 Release 3 from source using the 'smcs'
> compiler provided with MonoTouch. You can also look around (in git)
> since some people have already built it for MonoTouch (which could
> save you time).
>
> Sebastien
>
> On Thu, Oct 27, 2011 at 2:53 PM, jamminjimi <[hidden email]> wrote:
>> Hi,
>>
>> I have similar problem as I interface to json.net. Perhaps some light can
>> be
>> shed??
>>
>> Current installed software:
>> Monodevelop 2.8.1, Mono framework 2.10.6, Monotouch 5.0, Xcode 4.2, ios 5
>> sdk, Json.NET 4.0 Release 3
>>
>> Thank you for taking a look!
>> Jim
>>
>> Exception thrown:
>>
>> System.Threading.Tasks.Task.HandleGenericException
>> (e={System.MissingMethodException: Method not found:
>> 'System.Type.op_Equality'.
>>  at
>> Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.GetContractSafe
>> (System.Object value) [0x00008] in
>>
>> /Users/jamesphillips/Projects/Json40r3/Source/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:86
>>  at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize
>> (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value) [0x00011] in
>>
>> /Users/jamesphillips/Projects/Json40r3/Source/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:70
>>  at Newtonsoft.Json.JsonSerializer.SerializeInternal
>> (Newtonsoft.Json.JsonWriter jsonWriter, System.Object value) [0x00012] in
>>
>> /Users/jamesphillips/Projects/Json40r3/Source/Src/Newtonsoft.Json/JsonSerializer.cs:451
>>  at Newtonsoft.Json.JsonSerializer.Serialize (Newtonsoft.Json.JsonWriter
>> jsonWriter, System.Object value) [0x00000] in
>>
>> /Users/jamesphillips/Projects/Json40r3/Source/Src/Newtonsoft.Json/JsonSerializer.cs:443
>>  at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value,
>> Formatting formatting, Newtonsoft.Json.JsonSerializerSettings settings)
>> [0x0002c] in
>>
>> /Users/jamesphillips/Projects/Json40r3/Source/Src/Newtonsoft.Json/JsonConvert.cs:634
>>  at Newtonsoft.Json.JsonConvert.SerializeObject (System.Object value)
>> [0x00000] in
>>
>> /Users/jamesphillips/Projects/Json40r3/Source/Src/Newtonsoft.Json/JsonConvert.cs:571
>>  at Storyboard_Utility_App.SerializeMe.LoadTheProduct () [0x0005d] in
>> /Users/jamesphillips/Projects/Storyboard_Utility_App/SerializeMe.cs:47
>>  at Storyboard_Utility_App.SerializeMe..ctor () [0x00006] in
>> /Users/jamesphillips/Projects/Storyboard_Utility_App/SerializeMe.cs:35
>>  at Storyboard_Utility_App.MainViewController.<ViewDidLoad>m__0 ()
>> [0x00000] in
>>
>> /Users/jamesphillips/Projects/Storyboard_Utility_App/MainViewController.cs:38
>>  at System.Threading.Tasks.TaskFactory+<StartNew>c__AnonStorey15.<>m__A
>> (System.Object o) [0x00000] in
>>
>> /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/TaskFactory.cs:106
>>  at System.Threading.Tasks.Task.InnerInvoke () [0x0000b] in
>>
>> /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:424
>>  at System.Threading.Tasks.Task.ThreadStart () [0x00039] in
>>
>> /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:384
>> }) in
>>
>> /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:474
>>
>>
>> --
>> View this message in context:
>> http://monotouch.2284126.n4.nabble.com/System-MissingMethodException-Method-not-found-System-Type-op-Equality-tp3770750p3945599.html
>> Sent from the MonoTouch mailing list archive at Nabble.com.
>> _______________________________________________
>> MonoTouch mailing list
>> [hidden email]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
> _______________________________________________
> MonoTouch mailing list
> [hidden email]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://monotouch.2284126.n4.nabble.com/System-MissingMethodException-Method-not-found-System-Type-op-Equality-tp3770750p3945642.html
> To start a new topic under MonoTouch, email [hidden email]
> To unsubscribe from MonoTouch, click here.
>
> ________________________________
> View this message in context: Re: System.MissingMethodException: Method not
> found: 'System.Type.op_Equality'.
> Sent from the MonoTouch mailing list archive at Nabble.com.
>
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>


More information about the MonoTouch mailing list