sagifogel/Ramda.NET

Xamarin Alpha Channel Runtime Error

Closed this issue · 2 comments

using System;

namespace temp1
{
	class MainClass
	{
		public static void Main(string[] args)
		{
			Ramda.NET.R.Add(2, 3);
			Console.WriteLine("Hello World!");
		}
	}
}

The type initializer for 'Ramda.NET.Currying' threw an exception.

System.TypeInitializationException: The type initializer for 'Ramda.NET.Currying' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Ramda.NET.Currying' does not contain a definition for DynamicInvoke'
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Type,object,object[])
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) [0x0013d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:512
at Ramda.NET.Currying.Dispatchable (System.String methodName, System.Object xf, System.Object fn, System.Object[] arguments) [0x00195] in /Users/zzz/Downloads/Ramda.NET-master/Currying.internal.cs:254
at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) [0x00159] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:762
at Ramda.NET.Currying+c__AnonStoreyA.<>m__0 (System.Object arg1, System.Object arg2) [0x00000] in /Users/zzz/Downloads/Ramda.NET-master/Currying.internal.cs:221
at at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:313
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00107] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Delegate.cs:461
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/MulticastDelegate.cs:67
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Delegate.cs:406
at Ramda.NET.ReflectionExtensions.Invoke (System.Delegate target, System.Object[] arguments) [0x0006f] in /Users/zzz/Downloads/Ramda.NET-master/Extensions/ReflectionExtensions.cs:382
at Ramda.NET.DelegateDecorator.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] arguments, System.Object& result) [0x00009] in /Users/zzz/Downloads/Ramda.NET-master/DelegateDecorator.cs:18
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object,object)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) [0x0013d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:512
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object,object)
at Ramda.NET.Curry2.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] arguments) [0x001f9] in /Users/zzz/Downloads/Ramda.NET-master/Curry2.cs:32
at Ramda.NET.AbstractLambda.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] args, System.Object& result) [0x00005] in /Users/zzz/Downloads/Ramda.NET-master/AbstractLambda.cs:18
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object,System.Collections.IList)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) [0x0013d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:512
at Ramda.NET.Currying.m__9A (System.Object p, System.Collections.IList list) [0x00000] in /Users/zzz/Downloads/Ramda.NET-master/Currying.cs:1156
at at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:313
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00107] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Delegate.cs:461
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/MulticastDelegate.cs:67
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Delegate.cs:406
at Ramda.NET.ReflectionExtensions.Invoke (System.Delegate target, System.Object[] arguments) [0x0006f] in /Users/zzz/Downloads/Ramda.NET-master/Extensions/ReflectionExtensions.cs:382
at Ramda.NET.DelegateDecorator.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] arguments, System.Object& result) [0x00009] in /Users/zzz/Downloads/Ramda.NET-master/DelegateDecorator.cs:18
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object,object)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) [0x0013d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:512
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object,object)
at Ramda.NET.Curry2.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] arguments) [0x001f9] in /Users/zzz/Downloads/Ramda.NET-master/Curry2.cs:32
at Ramda.NET.AbstractLambda.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] args, System.Object& result) [0x00005] in /Users/zzz/Downloads/Ramda.NET-master/AbstractLambda.cs:18
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,string,System.Collections.IList)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) [0x0013d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:512
at Ramda.NET.Currying.m__AB (System.Object after, System.Collections.IList fns) [0x00015] in /Users/zzz/Downloads/Ramda.NET-master/Currying.cs:1289
at at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:313
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00107] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Delegate.cs:461
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/MulticastDelegate.cs:67
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Delegate.cs:406
at Ramda.NET.ReflectionExtensions.Invoke (System.Delegate target, System.Object[] arguments) [0x0006f] in /Users/zzz/Downloads/Ramda.NET-master/Extensions/ReflectionExtensions.cs:382
at Ramda.NET.DelegateDecorator.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] arguments, System.Object& result) [0x00009] in /Users/zzz/Downloads/Ramda.NET-master/DelegateDecorator.cs:18
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object,object)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) [0x0003e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:444
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object,object)
at Ramda.NET.Curry2.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] arguments) [0x001f9] in /Users/zzz/Downloads/Ramda.NET-master/Curry2.cs:32
at Ramda.NET.AbstractLambda.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] args, System.Object& result) [0x00005] in /Users/zzz/Downloads/Ramda.NET-master/AbstractLambda.cs:18
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object,System.Collections.IList)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) [0x0013d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:512
at Ramda.NET.Currying.m__B3 (System.Collections.IList fns) [0x00000] in /Users/zzz/Downloads/Ramda.NET-master/Currying.cs:1346
at at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004d] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System.Reflection/MonoMethod.cs:313
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00107] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Delegate.cs:461
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/MulticastDelegate.cs:67
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/corlib/System/Delegate.cs:406
at Ramda.NET.ReflectionExtensions.Invoke (System.Delegate target, System.Object[] arguments) [0x0006f] in /Users/zzz/Downloads/Ramda.NET-master/Extensions/ReflectionExtensions.cs:382
at Ramda.NET.DelegateDecorator.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] arguments, System.Object& result) [0x00009] in /Users/zzz/Downloads/Ramda.NET-master/DelegateDecorator.cs:18
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1) [0x00132] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:387
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object)
at Ramda.NET.Curry1.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] arguments) [0x00092] in /Users/zzz/Downloads/Ramda.NET-master/Curry1.cs:27
at Ramda.NET.AbstractLambda.TryInvoke (System.Dynamic.InvokeBinder binder, System.Object[] args, System.Object& result) [0x00005] in /Users/zzz/Downloads/Ramda.NET-master/AbstractLambda.cs:18
at at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,object[])
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1) [0x00132] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/dlr/Runtime/Microsoft.Scripting.Core/Actions/UpdateDelegates.Generated.cs:387
at Ramda.NET.Currying..cctor () [0x02a39] in /Users/zzz/Downloads/Ramda.NET-master/Currying.cs:1383
--- End of inner exception stack trace ---
at temp1.MainClass.Main (System.String[] args) [0x00003] in /Users/zzz/Projects/temp1/temp1/Program.cs:9

What do I need to do in order to reproduce the problem?
Can you elaborate on the Xamarin tool (which version, how did you try to compile it - debug or release).
10x.

It's an x86 console app in debug mode. It may just be a limitation of Xamarin not being able to run dynamic code on iOS and choosing not to support it in general though. Had a 2013 community version of Visual Studio, so I was just trying to play with your library however I could most easily.

Xamarin Studio Business
Version 6.2 (build 1701)
Runtime:
Mono 4.8.0 (mono-4.8.0-branch/038ff4a) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 408000425

NuGet
Version: 3.5.0.0

Xamarin.Profiler
Not Installed

Apple Developer Tools
Xcode 8.2.1 (11766.1)
Build 8C1002

Xamarin.iOS
Version: 10.4.0.67 (Xamarin Business)
Hash: 6a925ff
Branch: master
Build date: 2017-01-03 14:04:46-0500

Xamarin.Android
Version: 7.1.0.17 (Xamarin Business)
Android SDK: /Users/zzz/Library/Android/sdk
Supported Android versions:
4.0.3 (API level 15)
6.0 (API level 23)
7.0 (API level 24)

SDK Tools Version: 25.2.3
SDK Platform Tools Version: 25.0.1
SDK Build Tools Version: 24.0.2

Java SDK: /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Android Player
Not Installed

Xamarin.Mac
Version: 3.0.0.337 (Xamarin Business)

Xamarin Inspector
Not Installed

Build Information
Release ID: 602001701
Git revision: f2922e7c22b4f206ee2d7683ca59701757f80da3
Build date: 2017-01-03 11:10:00-05
Xamarin addins: 3ea2e145863004103d37d20fc2c94fcd7bb6a1ce
Build lane: monodevelop-lion-cycle9

Operating System
Mac OS X 10.12.2
zzz 16.3.0 Darwin Kernel Version 16.3.0
Thu Nov 17 20:23:58 PST 2016
root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64