Wednesday, July 04, 2007 - Posts

svcutil /dconly results in 'Error: The input read from 'http://localhost/MyService.svc?wsdl' is inconsistent with other options.'

Larry asked in the MSDN Forums why the following command line:

svcUtil http://localhost/MyService.svc?wsdl /dconly

raises this error:

Error: The input read from 'http://localhost/MyService.svc?wsdl' is inconsistent with other options.

 The essential note is stated in the Windows SDK Release Notes (Link):

5.4.11 Service Model Metadata Utility Tool (SvcUtil.exe) Can’t Generate Data Contracts from a Running Service

An example at the end of the svcutil.exe help output indicates that you can use the /dataContractOnly (/dconly) option to generate Data Contracts from a running service:

svcutil /dconly http://service/metadataEndpoint
- Generate Data Contract types from a running service or online metadata documents.

This usage does not work. You can only use the /dconly option to generate Data Contracts from local metadata files.

with 2 Comments