This documentation is archived and is not being maintained.

WsdlExporter.ExportContract Method

Exports metadata that describes only the contract information from the specified contract description.

Namespace:  System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public override void ExportContract(
	ContractDescription contract


Type: System.ServiceModel.Description.ContractDescription

The ContractDescription to generate metadata from.


The exporter encountered an error.


The contract is null.

Use the ExportContract method to export metadata from only one contract.

The following code example demonstrates how to call ExportContract to export only contract information.

WsdlExporter exporter = new WsdlExporter();

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0