0

Okay, I have two OperationContracts and MessageContracts, like this:

[OperationContract]
OperationResult OperationOnSingleItem(Input input)

[OperationContract]
OperationResult OperationOnItemCollection(Inputs inputs)

[MessageContract]
public class Inputs
{
    [MessageBodyMember]
    Input[] InputCollection
}

[MessageContract]
public class Input
{
    ...............
    ...............
}

Now when I add this WCF service reference to a client, I see duplicate classes, both which correspond to the same Object Input.

i.e. in my client I can see ServiceReference.Input and another duplicate class called ServiceReference1.Input1.

Both have similar members, but i cant use the minterchangably since i get a type mismatch.

How do i stop the duplicate entries from being generated in the proxy.

ashwnacharya
  • 14,601
  • 23
  • 89
  • 112

1 Answers1

1

Using svcutil from the command line, you can specify the location of the input class so that the duplicate class is not generated.

pattersonc
  • 1,282
  • 11
  • 13