Wednesday, August 01, 2007

* WCF Tool : ServiceModel Metadata Utility Tool (Svcutil.exe)

Previous Post <- Tool : WCF Configuration Editor ( SvcConfigEditor.exe)

This tool is a useful assistant in any activity which involves metadata of the service. Some of the useful operations which this tool can perform are :

  • Generate client code from metadata including client config file. Metadata can be fetched from service by this tool and metadata stored in files can also be used.
  • Export Metadata from compiled service implementation code or running services - useful when you don't want to expose metadata through your hosted service in production.
  • To validate compiled service code using the configuration file - what could be the actual usage scenario for this ?
  • This tool can be found in following directory <Installation_Drive>:\Program Files\Microsoft SDKs\Windows\v6.0\Bin
  • Some of the important switches/options which can be used with this tool are :
    • /mergeConfig : As this tool overwrites the existing files, this switch can be used to merge with existing files.
    • /dconly : generates code for data contract types only.
    • /language : language to use for code generation.
    • /async : Generates both synchronous & asynchronous method signatures.

Next Post -> WCF : Overview of Hosting in IIS

No comments:

Post a Comment