Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate WCF service with SvcUtil.exe

I am using SvcUtil.exe to generate IClassName.cs file from wsdl file and that is working fine. My problem is that I do not know how to generate ClassName.svc file using command arguments for SvcUtil.exe.

After running the SvcUtil.exe I would like to get WCF service like when you created from Visual Studio Wizard containing all classes *.svc, *.cs, and interface.

Thank You, Skrch

like image 995
Skrch Avatar asked Jun 02 '14 15:06

Skrch


1 Answers

Svcutil.exe generates the service client proxy based on the Web Service Description Language (WSDL) from the service.

Open the visual studio command prompt and run the command

svcutil http://localhost/MyService/Service.svc  /Language=c#  /t:Code  /out:C:\Service\ServiceProxy.cs /config:C:\Service\ServiceProxy.config

it generates two files in C:\Service folder, the proxy file and config file,

More details here.

like image 113
Rajeev Tiwari Avatar answered Nov 15 '22 17:11

Rajeev Tiwari