How to: Use Svcutil.exe to Export Metadata from Compiled Service Code

Svcutil.exe can export metadata for services, contracts, and data
types in compiled assemblies, as follows:

To export metadata for all compiled service contracts for a set of
assemblies using Svcutil.exe, specify the assemblies as input
parameters. This is the default behavior.

To export metadata for a compiled service using Svcutil.exe, specify
the service assembly or assemblies as input parameters. You must use
the /serviceName option to indicate the configuration name of the
service you want to export. Svcutil.exe automatically loads the
configuration file for the specified executable assembly.

To export all data contract types within a set of assemblies, use the
/dataContractOnly option.

Note:

Use the /reference option to specify the file paths to any dependent assemblies.