Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method not found: 'System.Type.op_Equality'

I'm getting this error

System.MissingMethodException: Method not found: 'System.Type.op_Equality'.

When running a build. (likely because I'm on the Android simulator, and the JIT is catching it.)

I'm getting these warnings when building:

Target ResolveAssemblyReferences:
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Reference 'Mono.Android' not resolved
        For searchpath {CandidateAssemblyFiles}
        Warning: {CandidateAssemblyFiles} not supported currently
        For searchpath {HintPathFromItem}
        HintPath attribute not found
        For searchpath {TargetFrameworkDirectory}
        Considered target framework dir /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0, assembly named 'Mono.Android' not found.
        For searchpath {PkgConfig}
        Considered Mono.Android, but could not find in any pkg-config files.
        For searchpath {GAC}
        Considered Mono.Android, but could not find in the GAC.
        For searchpath {RawFileName}

I've installed both Mono for Android and MonoTouch on my mac. Could this have over-written some settings?

I'm also getting these as warnings:

Target ResolveAssemblyReferences:
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Found a conflict between : 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' and 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' reference.
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Found a conflict between : 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' and 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' reference.
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Found a conflict between : 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' and 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Using 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' reference.

I'm sure that there is just some setting under the project's compiler that I just don't know about.

like image 779
Stephen Furlani Avatar asked Oct 05 '22 23:10

Stephen Furlani


1 Answers

It looks like you've somehow ended up building your Mono for Android project referencing 4.0 assemblies. In theory this should not be possible unless you edited the project file with a text editor (MonoDevelop will not allow you to modify the project so that this will happen).

I suggest you create a new Mono for Android project from a template, and compare the two project files to see if you can deduce what is wrong in yours.

like image 190
Rolf Bjarne Kvinge Avatar answered Oct 08 '22 12:10

Rolf Bjarne Kvinge