【发布时间】:2013-11-27 15:23:50
【问题描述】:
我下载了 eBay SDK 用于我们正在开发的内部应用程序。问题是我们正在 Mono 上开发。当我在 .NET 上运行 eBay Hello World 示例时,它会显示以下输出:
+++++++++++++++++++++++++++++++++++++++
+ Welcome to eBay SDK for .Net Sample +
+ - HelloWorld +
+++++++++++++++++++++++++++++++++++++++
Begin to call eBay API, please wait ...
End to call eBay API, show call result:
eBay official Time: 11/27/2013 3:02:19 PM
当我使用 Mono 运行它时,我得到以下信息:
Unhandled Exception: eBay.Service.Core.Sdk.ApiException: 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.InvalidOperationException: WebServiceBindingAttribute is required on proxy class 'eBay.Service.Core.Sdk.eBayAPIInterfaceService2'.
at System.Web.Services.Protocols.SoapTypeStubInfo..ctor (System.Web.Services.Protocols.LogicalTypeInfo logicalTypeInfo) [0x00000]
at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (object,object[],System.Exception&)
etc...etc...etc...
我找到了一种解决方法,并将其发布在下面的答案中。
【问题讨论】:
-
什么版本的单声道?
-
我使用的是 3.2.3,但根据我在下面的答案中发布的 Novell Bugzilla 报告,这个错误至少从 2.10.x 开始就存在。
-
这个错误很可能从 0.1 版本开始就存在 ;) 请总是询问有关单声道的问题,请指定您正在使用的版本
-
道歉......本来是想但忘记了在我的兴奋中发布答案。 :) 谢谢提醒!
-
嘿,我在使用 mono 时遇到了类似的错误,有没有办法通过在 .config 文件中放入一些东西来绕过它而无需重新编译?