3

Why would someone use SvcUtil.exe when Add Service Reference in VS.NET provides all the proxy classes you'll need?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
4thSpace
  • 43,672
  • 97
  • 296
  • 475

2 Answers2

3

Sometimes Add Service Reference in VS fails to create a useful proxy. Instead it gives you an empty Reference.cs details here and here file. I've created a series of bat files to call SvcUtil.exe to generate the proxy classes.

Community
  • 1
  • 1
gbanfill
  • 2,216
  • 14
  • 21
1

Both svcutil.exe & 'Add Service reference' will use the same proxy generation code underneath. Think of 'Add service reference' as a UI way to generate proxy where it pre-populates a set of switches that you will have to do in svcutil command line. For example when you add service reference in VS the UI lets you to reuse types from referenced assemblies, specify the kind of proxy to be generated (sync-async / task based etc). svcutil will also be useful if you want to automate service reference generation.

Praburaj
  • 11,417
  • 1
  • 23
  • 20