Home / Software / Tips and Tricks / ServiceModel Metadata Utility Tool (Svcutil.exe)

ServiceModel Metadata Utility Tool (Svcutil.exe)

Category: Visual Studio
view more software Tips and Tricks
Updated:  08/22/2012 08:08 AM
Author:  Shiju Mathews

Status:    Resolved.


The ServiceModel Metadata Utility tool is used to generate service model code from metadata documents and metadata documents from service model code.

SvcUtil.exe

The ServiceModel Metadata Utility Tool can be found at the Windows SDK installation location, specifically, C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin


if you are not installed Microsoft Windows SDK for Windows 7 and .NET Framework 4, download from SDK for Windows 7 and .NET Framework 4

Functionalities

The following table summarizes the various functionalities provided by this tool and the corresponding topic that discusses how it is used.

Task Topic

Generates code from running services or static metadata documents.

Generating a WCF Client from Service Metadata

Exports metadata documents from compiled code.

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

Validates compiled service code.

How to: Use Svcutil.exe to Validate Compiled Service Code

Downloads metadata documents from running services.

How to: Use Svcutil.exe to Download Metadata Documents

Generates serialization code.

How to: Improve the Startup Time of WCF Client Applications using the XmlSerializer

Caution:
Svcutil will overwrite existing files on a disk if the names supplied as parameters are identical. This can include code files, configuration or metadata files. To avoid this when generating code and configuration flies, use the /mergeConfig switch.

In addition, the /r and /ct switches for referencing types are for generating data contracts. These switches do not work when using XmlSerializer.