Pantelis
Pantelis

Reputation: 2070

How do I change the CollectionType on a service proxy generated with svcutil.exe?

Ok, so I have implemented my services, created a new WCF service website to host my services in IIS and used svcutil to export metadata to the .xsd and .wsdl files. From these files I generated the service proxy.cs and .config files and added them to the client.

One of my service operations returns a Generic List to the client though. I know how to change the CollectionType of the deserialized DataType by configuring the Service Reference when it has been added from visual studio (Add Service Reference), but how do I change (or set during the creation of the proxy with svcutil(?)) the CollectionType?

Upvotes: 0

Views: 1219

Answers (1)

Sixto Saez
Sixto Saez

Reputation: 12680

There is a switch /collectionType:<type> you can add to specify the type. See the MSDN docs for all the detail.

Upvotes: 2

Related Questions