I have a client app consuming a WCF service that is accepting and returning some complex type parameters. these complex types are held in a separate assembly that both the client app and the WCF service are referencing..
the problem is that when I add the service reference in the client app, the generated reference class builds its own versions of the complex parameter types and hence I cant pass in the types from the assembly that the original types are defined.
not sure if that is at all understandable..
question is.. am I going to have to write some sort of reflective deep copy routine to effectively build up the service reference generated classes from the original types?
or is there a better option
any help as ever very happily received
nat
When you are adding a service reference to code, select
Advancedand you’ll see an optionReuse types in referenced assemblies. If you ensure that is checked, and the reference is added to the project, WCF won’t generate the proxy types and use the referenced types instead.If you’ve already added the service reference, reference your shared types first, and then right-click the Service Reference, and select
Configure Service Referenceto get it to regenerate the client code using your referenced types.