无法生成临时类 (result=1).错误 CS0030: [英] Unable to generate a temporary class (result=1). error CS0030:
问题描述
我正在尝试使用 https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl.当我调用使用
I am trying to paypal express checkout i used https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl. when i call use
PayPalAPIAASoapBinding paypal = new PayPalAPIAASoapBinding();
我收到错误
无法生成临时类 (result=1).错误 CS0030:无法转换类型'exprtesscheckoutdemo.com.paypal.sandbox.TupleType[]' 到paypal.sandbox.TupleType"错误 CS0029:无法隐式转换输入paypal.sandbox.TupleType"到
Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'exprtesscheckoutdemo.com.paypal.sandbox.TupleType[]' to 'paypal.sandbox.TupleType' error CS0029: Cannot implicitly convert type 'paypal.sandbox.TupleType' to
如何解决这个问题
推荐答案
在更新到版本 119 时自己点击这个.在您生成的 Web 服务文件中,查找 [][]
和用 []
替换所有出现的地方.坏人似乎是 PaymentDetailsType
中的 merchantDataField
.
Just hit this myself when updating to version 119. In your generated Web service file, do a find for [][]
and replace all occurrences with []
. The bad guy seems to be the merchantDataField
in the PaymentDetailsType
.
这似乎是 Microsoft WSDL 工具中的一个错误与具有maxOccurs 属性设置为无界的嵌套节点"的服务交互时;我之前在与 FedEx SOAP API 交互时也遇到过这种情况.
It seems to be a bug in the Microsoft WSDL tools when interacting with services that have "nested nodes with the maxOccurs attribute set to unbounded"; I've encountered it before when interacting with FedEx SOAP APIs as well.
这篇关于无法生成临时类 (result=1).错误 CS0030:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!