I have a .NET WCF service that only services .NET WCF clients (all .NET 3.5, no interaction, over TCP, binary encoding). Using svcutil.exe, the composite types used by service data members are generated as part of the proxy.cs class used by clients.
However, what if I wanted to refer to the same types that were declared on the server / WCF side? Scenario: three assemblies: client.exe, wcfobjects.dll and wcfservice.dll -> Links wcfservice.dll wcfobjects.dll -> the client also refers to wcfobjects.dll
How can I create a proxy that does NOT include types used by the service? Is it possible? Thanks.
Found this answer: in order for svcutil.exe to NOT generate types in the client proxy, you need to explicitly refer to wcfobjects.dll in the command line:
svcutil * .wsdl * .xsd / async / tcv: Version35 / language: C # / r: \ wcfobjects.dll / out: \ Proxy.cs / config: \ App.config
Thanks again.
source share