I have a solution with three projects:
A) web service
b) front end website
c) a common library
I have a type in the library called ecrfTupple.
I would like the web service to return lists of these, however when the front end web site gets them they are typed as webservice.ecrfTupple rather than the common library type.
How do I force the specific type to be transmitted? or is there another solution?
There is an option of a service reference to reuse existing types (right-click and choose “Configure Service Reference…”). This might help. I use a different approach when dealing with WCF services. Much like your solution, I use a common library between my service and web application. In this library, I define the types and contracts used in the WCF services. I also hand-code the proxy class. Using this method, I never have to add a “service reference” in Visual Studio. I just make service calls through the normal project reference. This is much easier for maintenance. If my service changes, I update my common library and all clients are immediately updated. There’s no need to bounce to every client and update the service reference. Hope that helps.