"ServiceKnownType"生成的文件中缺少属性 [英] "ServiceKnownType" attribute is missing from generated file

查看:56
本文介绍了"ServiceKnownType"生成的文件中缺少属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi

因为服务参数中的复杂类型(输入,输出),我不得不用"ServiceKnownType"修饰服务操作合同.属性.

becuase of complex type in service params (in,out) I had to decorate the service Operation contract with "ServiceKnownType" attribute.

问题是,当我热添加服务引用以生成在生成的接口中未出现属性的proxi类时.

The problem is that when i heat add service refference to generate proxi class that attribute dows' t apear in generated interface.

当我运行应用程序时,它会抛出有关已知类型的证据.

when I run the app it throw exeption about known type.

所以我手动添加了它,一切正常...

 so i added it manualy and every thing work...

当然,每次我更新网络参考时,我都必须重新做一次.

of course that every time i doing update web refference i have to do it again.

有什么捷径吗?

谢谢

推荐答案

您可以张贴一个小样本的重现该问题的ServiceContract和KnownTypes?


这篇关于"ServiceKnownType"生成的文件中缺少属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆