I'm getting an error when running this F# Script in the Xamarin Studio (Mac OS X) F# Interactive window:
#r @"../../packages/RabbitMQ.Client/lib/net45/RabbitMQ.Client.dll"
#r @"../../packages/EasyNetQ/lib/net45/EasyNetQ.dll"
open System
open RabbitMQ.Client
open EasyNetQ
let ServiceBusHost = "host=myRabbitMQServer;virtualHost=someHost;username=someUser;password=somePwd;timeout=0"
let serviceBus = RabbitHutch.CreateBus(ServiceBusHost)
Error:
"Could not resolve field token 0x0400000b" <null>
System.BadImageFormatException: Could not resolve field token 0x0400000b
File name: 'EasyNetQ'
at <StartupCode$FSI_0004>.$FSI_0004.main@ () <0x790eb10 + 0x00153> in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x1a55ba0 + 0x000a1> in <filename unknown>:0
Stopped due to error
But it runs ok in Visual Studio 2015 (Windows). I have the packages installed and properly referenced, also the ServiceBusHost is working fine in the VS 2015 (Windows).
Target Framework: Mono / .NET 4.5 Compiler Configuration: Debug / Any CPU OS: Mac OS X
Any ideas?