You can generate your client proxy with svcutil.exe and use the /r switch to specify assemblies that you want referenced instead of re-emitted in the auto-generated client proxy code.
- ProjACommon
- ProjBSvc
- References ProjACommon
- ProjCClient
- References ProjACommon
- You want a client that references ProjA types and/or code rather than them being auto-generated into a new namespace within C
After building ProjBSvc exec the following, which outputs .wsdl & .xsd
svcutil.exe ProjBSvc.dll
2nd consume the wsdl & xsd to generate a proxy/client:
svcutil.exe *.wsdl *.xsd /o:<ProjCClientPath>/Client.cs /r:ProjACommon.dll
ProjCClient references Client.cs generated from previous steps
Build and examine with the object browser and you will see the types in C referencing the types in A instead of new types with the same name in C's namespace.
You may want /tcv
and /n
as well as other switches to meet your needs.
Here is an article that may help. It also links to the Microsoft documentation for svcutil