Xamarin Studio (Mac OS X) の F# インタラクティブ ウィンドウでこの F# スクリプトを実行すると、エラーが発生します。
#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)
エラー:
"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
しかし、Visual Studio 2015 (Windows) では問題なく動作します。パッケージをインストールして適切に参照しました。また、ServiceBusHost は VS 2015 (Windows) で正常に動作しています。
ターゲット フレームワーク: Mono / .NET 4.5 コンパイラ構成: デバッグ / 任意の CPU OS: Mac OS X
何か案は?