gpt4 book ai didi

c# - cs0030 :Unable to generate a temporary class

转载 作者:可可西里 更新时间:2023-11-01 08:18:51 25 4
gpt4 key购买 nike

我有一个 Web 服务,当我尝试生成它的对象时出现以下错误。

"Unable to generate a temporary class (result=1).error CS0030: Cannot convert type 'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment[]' to 'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment'error CS0030: Cannot convert type 'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment[]' to 'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment'error CS0030: Cannot convert type 'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment[]' to 'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment'error CS0029: Cannot implicitly convert type 'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment' to 'ShortSell.ShortSellRQOriginDestinationInformationFlightSegment[]'error CS0029: Cannot implicitly convert type 'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment' to 'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment[]'error CS0029: Cannot implicitly convert type 'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment' to 'ShortSell.ShortSellRSOriginDestinationOptionFlightSegment[]'"}

我尝试将临时文件夹属性更改为可写,但我仍然收到此错误。为什么会出现此错误,我该如何解决?

最佳答案

这是一个无法修复的已知错误:

当 wsdl 中的复杂类型恰好包含一个无限出现的元素时,就会发生错误。解决方法,取自 this forum discussion (归功于 Elena Kharitidi),是为此类类型添加虚拟属性:

<xs:sequence maxOccurs="unbounded">
<xs:element ../>
<xs:sequence>
<xs:attribute name="tmp" type="xs:string" /> <-- add this

<xs:sequence>
<xs:element maxOccurs="unbounded"/>
<xs:sequence>
<xs:attribute name="tmp" type="xs:string" /> <-- add this

关于c# - cs0030 :Unable to generate a temporary class,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7581440/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com