Side by side comparsion between svcutil and the service reference in VS

The Service Reference is new feature added into VS Orcas, so we don't have to use svcutil when using VS IDE.  Here is the side by side comparsion table between svcutil and the service reference in Orcas:

Svcutil command line

VS service reference (.svcmap)

VS UI

/out

(always delivery from the name of .svcmap)

/config

(always the config file of the project)

/mergeConfig

Always true

/noConfig

Not supported

/dataContractOnly

Not supported

/language

Always based on the project

/namespace

<NamespaceMappings>

But *-> ReferenceName is always added

/messageContract

<GenerateMessageContracts>

Yes

/enableDataBinding

<EnableDataBinding>

/serializable

<GenerateSerializableTypes>

/async

<GenerateAsynchronousMethods>

Yes

/internal

<GenerateInternalTypes>

Yes

/reference

<ReferenceAllAssemblies>

<ReferencedAssemblies>

<ReferencedDataContractTypes>

<ServiceContractMappings>

Can pick up existing reference assemblies of the project automatically

Limited

/collectionType

<CollectionMappings>

Limited

/excludeType

<ExcludedTypes>

/noStdLib

Through <ReferencedAssemblies>

Yes

/serializer

<Serializer>

/importXmlTypes

<ImportXmlTypes>

/targetClientVersion

Based on the project

/t:metadata

Not supported

/validation

Not supported

/t:xmlSerializer

Not supported

Multiple url/file

<MetadataSources>

/svcutilConfig

<ExtensionFile Name=”Reference.config” />

 Essentially, the svcutil is built for several tasks like exporting metadata, validating the service. But the service reference is built for generating proxy/configuration only. However, in the proxy/configuration generating scenario, the function of the service reference and svcutil are overlapped. The service reference supports most options svcutil supports in its command line. However, to access those options, editing the .svcmap file is necessary (only limited options are exposed through UI.) By saving the options in a file, however, it is easier to repeat the process, when the service is updated.

 

 The advantage to use the service reference is clear when using the IDE. We don't lose most ablility of the svcutil tool, but gain some convenience: options like the language/targetPlatform don't have to be chose again, but will be picked up from the project system automatically. The result config is also automatically merged, and previous injected configuration will be tracked, and removed when the reference is removed or updated, so it won't inject lots of duplicated items. (That function is limited in this version if binding in the configuration is editted.) The IDE also supports better experience when the service is secured.