2

I have a very strange problem which I do not understand. I have my WCF interface which methods are decorated with the [OperationContract] attribute. Then I have my Service Reference folder which I update every time I change my interface.

Everything works fine until in my interface I will declare a method that takes any collection as the argument (List<T>, Array<T>, IEnumerable<T> etc.).

Then when I run the "Update Service Reference" it finish without any errors, but the generated Reference.cs file is empty.

In the "Configure Service Reference" window I have the "Collection Type" set to "System.Collection.Generic.List"

Anyone knows why I cannot use collection types as argument in my Operation Contract method? Or how to fix it?

Thank you for help.

user2323704
  • 853
  • 1
  • 7
  • 13

1 Answers1

0

This can sometimes happen when the type T of your List<T> is not serailizeable or a DataContract.

Also try and uncheck the

"Reuse Types in Referenced Assemblies"

in your configuration.

flayn
  • 5,272
  • 4
  • 48
  • 69