System.BadImageFormatException:无法解析字段标记0x0400000b

时间:2016-04-20 16:38:50

标签: f# mono rabbitmq xamarin-studio easynetq

我在Xamarin Studio(Mac OS X)F#Interactive窗口中运行此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 操作系统:Mac OS X

有什么想法吗?

0 个答案:

没有答案