svcutil.exe redundant proxy classes

纵然是瞬间 提交于 2020-01-15 10:13:00

问题


I have a WCF service library containing two services. These two services share a common set of classes in their operations.

When I generate the WCF proxies with svcutil.exe, I get two sets of proxy classes (one for each service). Is there any way to have it only generate one set of these shared classes? Or will I have to partition these classes into separate namespaces?


回答1:


You can supply multiple service endpoint URI's to the svcutil.exe command line. When you specify more than one endpoint URI, any types that share a common schema will be generated once and reused amongst all service contracts.

http://msdn.microsoft.com/en-us/library/aa347733.aspx



来源:https://stackoverflow.com/questions/1163506/svcutil-exe-redundant-proxy-classes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!