I have two WCF services, one for reading operations and the other one for writing operations.
Although they are doing different operations, both of them are sharing the same classes (through a DLL reference to other project wich supports the model of the problem).
My problem is that, when I try to add both services to my C# project I can't share the same namespace:
Cannot create a service reference with namespace 'X' because the name is already in use by an existing service reference, folder or file
If services are placed in different namespaces, classes are different and duplicated code grows a lot.
Is there any solution?
Edition: Very similar to: Two WCF services with different contracts but same business objects . No solution anyway.
If you use VS 2010 (probably works on 2008 also) click advanced button in "add service reference" window and use "reuse types in specified referenced assemblies". You may have to move generated types to other assembly depending on how your project look like.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With