I have a problem with a small app I’m trying to build. When I turn on linking, I’ve tried both SDK Assemblies only and SDK and user assemblies, I get the same exception when I’m trying to build an APK.
Exception:
System.Exception: The "LinkAssemblies" task failed unexpectedly.
System.OverflowException: Arithmetic operation resulted in an overflow.
at Mono.Cecil.PE.ByteBuffer.ReadUInt32()
at Mono.Cecil.Cil.CodeReader.ReadOperand(Instruction instruction)
...
I get exactly the same exception when I just create a new Mono project and try to build an APK with linking turned on.
Grateful for any help..
This exception comes from
Mono.Cecil.dll, i.e. the library on which the linker is based. That’s quite uncommon and it will need to be debugged.I can’t even propose a workaround (except not linking) without knowing more about how that assembly was generated (e.g. compiler, obfustactor…)
Can you fill a bug report at http://bugzilla.xamarin.com and attach the offending assembly ? Thanks!