简体   繁体   中英

WCF Proxy class not generating

I have a WCF service which is used by two client applications, one is a web application and the other is a Windows forms application.

When I add a service reference to the web application it works perfectly.

But, when I add a service reference to the Windows application it doesn't generate the proxy class.

Then I run selected the "Reuse types in referenced assemblies" in configure service reference section and it generates the reference with XML serialization. That is not what I needed because it gives me lot of errors since I'm using GUID everywhere.

Can anyone explain me how to generate the proxy class with runtime serialization? (both client application use same version of visual studio - Vs2010)

I'm really struggling with this and your help is highly appreciated.

You can use svcutil to generate proxy class. Add these proxy class in a DLL and then reference it in your Web and Windows application. In this way, you don't need to rely on Visual Studio and will have consistent proxy code for both Web and Windows app

More details - http://msdn.microsoft.com/en-us/library/aa702581(v=vs.110).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM