Reputation: 137
I am trying to generate the proxy file from wcf service using svcutil.exe, but I didn't understand how to pass the parameters to svcutil to collection type as system.Collections.Generic.List
I tried the below command in visual studio command prompt.
svcutil http://localhost:19021/InterviewManagementService/InterviewManagementService.svc /l:C# /out:Reference.cs /config /s /ct:System.Collections.Generic.List`1 /t:code /n:*,newnamespace
Please correct me with the above command.
Upvotes: 1
Views: 1586
Reputation: 6981
I think you need to specify the assembly for the referenced collection types (more info here).
When using the Svcutil.exe tool, this reference can be accomplished by using the /collectionType command-line switch (short form: /ct). Keep in mind that you must also specify the assembly for the referenced collection types using the /reference switch (short form: /r). If the type is generic, it must be followed by a back quote and the number of generic parameters. The back quote (`) is not to be confused with the single quote (‘) character. You can specify multiple referenced collection types by using the /collectionType switch more than once.
So you need to add /r:C:\full_path_to_system_dll\System.dll
to your command right before /ct:System.Collections.Generic.List
Upvotes: 0