Thursday, February 14, 2013

For Beginners : How to compile a .cs file without visual studio


Generate a proxy of a WCF Service



SVCUTIL.exe is the tool used to generate proxy of a WCF Service class. A simple way of creating a proxy with all default options is :
  • Open Microsoft Visual Studio Command Prompt 2010.
  • svcutil.exe [assembly name]- This will generate the .wsdl & .xsd files.
  • svcutil *.wsdl *.xsd /language:C# - This will generate the proxy class(.cs file) and output.config file.
  • Add the proxy class to your client project and copy the content of the output.config file to App.Config file.