SVCUTIL question excluding one endpoint when using service with multiple endpoints RRS feed

  • Question

  • I have a service that contains two endpoints.  I have a client that wants to use just the methods in one of the endpoints.  If I use Add Service Reference both endpoints and all their methods are imported. 

    I am working on defining an svcutil command and it appears the /et option is what I need to exclude the first endpoint and it's methods, but I can't find a clear example of a fully qualified type name.  Plus I'm not sure the /et switch is the switch I need to use.  The connection is being done through a wsdl for a C# implementation.

    I've tried /et:namespace.class.interface name and every variation of this that I can think of, but the generated .cs file still contains all the methods for the endpoint that I don't need.

    For example

    namespace a.b.c
       public interface InterfaceToExclude
         bool MethodToExclude()

    my service definition is

    public class MyService: InterfaceToExclude, InterfaceToInclude

    so would the /et switch be

    1) /et:a.b.c.InterfaceToExclude   or

    2) /et:a.b.c.InterfaceToExclude.MethodToExclude

    sadly neither of these two options actually caused the generated .cs code to exclude the first endpoints interfaces, methods or data definitions.

    my current svcutil command is

    svcutil /target:code   http://machine.domain/path/MyService.svc /language:CS /et:a.b.c.InterfaceToExclude

    Can you exclude the generation of the methods and support for one of the endpoints using the svcutil command?  If so what switches do this?  Is it includes or excludes?


    Tuesday, October 10, 2017 3:52 PM

All replies

  • Hi Janet,

    I made a test by following your description, and I could get the same result. /et did not take any effect and did not throw any exception.

    For this issue, I would suggest you submit an issue.


    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, October 11, 2017 7:28 AM