4thSpace
4thSpace

Reputation: 44352

SvcUtil.exe vs Add Reference

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

Upvotes: 3

Views: 5175

Answers (2)

Praburaj
Praburaj

Reputation: 11547

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.

Upvotes: 2

gbanfill
gbanfill

Reputation: 2216

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.

Upvotes: 3

Related Questions