I am confused how to add/include/reference a set of supporting classes required for both server and client projects where WCF is involved.
In my C# solution I have:
- A Server project doing server type stuff
- A Client project doing gui type stuff
- A WCF Library containing class definitions for network passed data objects
The Server project uses a normal reference to include the WCF library. The Client project uses a service reference to the WCF library.
My problem is that I have a couple of utility classes that are needed in both the Server and Client projects which use object definitions contained in the WCF library. I don't want to have two (identical) copies of these classes placed in the Server and Client projects - I would prefer just maintain the one copy. That would suggest using a class library, but how does the referencing work then? This new class library would have a standard reference to the WCF Library, and then both the Server and Client projects would have to standard reference this new class library in turn. But wouldn't then the Client project now have two differently defined definitions of the data objects classes contained in the WCF library? How else should these utility classes be included?