none
How to generate wcf service references for differenct services inside a dll under different namespaces? RRS feed

  • Question

  • I have three services. I want to generate the service references and data references for the 3 services inside one dll. But i want to keep the references generated by different services in different namespaces inside the dll and not one standard namespace so that the API's or operation contracts in each of the services will not have to be unique. Incase if all the service contracts are present in the same namespace then the all the operation contracts in the different services have to be unique otherwise the service reference will not be generated. I dont want to keep the API names unique
    • Edited by 12ShreyasK Friday, March 13, 2020 10:52 AM na
    Friday, March 13, 2020 10:51 AM

All replies

  • Hi,

    You could use the command line tool svcutil.exe ( https://docs.microsoft.com/en-us/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe ) to generate the proxy files and include those in your project.

    Put the commands to generate the proxy classes in a powershell file so that you can easely run it again when one of the service interfaces changes. (you could even put that in a prebuild step)

    Don't edit the generated proxy classes otherwise your edit's will be lost when you regenerate.


    Hope this helps,

    Here to learn and share. Please tell if an answer was helpful or not at all. This adds value to the answers and enables me to learn more.

    About me

    Friday, March 13, 2020 12:35 PM