use Svcutil to export metadata RRS feed

  • Question

  • It is a console application to consume a WCF service.

    I don't want to go into visual studio and click 'Add service reference'. I want to use svcutil.exe to generate the meta data. The question is if using "Add service reference", the app.config will have endpoint etc. If I choose svcutil.exe method, what happens in the app.config? Should I manually add the endpoint settings?

    Tuesday, September 8, 2015 1:34 PM


  • Hi HZ.USA,

    According to this case, if you want to generate the meta data with SvcUtil.exe. In my opinion

    you need add the external tools in visual studio. >>Tools->External tools -> chose add button

    -> in command you need go to following address to chose svcutil.exe file.

    C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools

    Then initial directory you can chose solution directory.

    Next, you need to use suvutil.exe and enter the  Url  like this http://localhost:6251/Service1.svc?wsdl

    Then you will generate a output.config file and a .cs file , you need delete app.config file and add

    the config file and .cs file in your console application.

    For more information, please refer to the following articles:

    1.ServiceModel Metadata Utility Tool (Svcutil.exe)

    2.How to: Use Svcutil.exe to Download Metadata Documents

    3.Using SvcUtil.exe

    I hope that will be helpful to you.

    Best Regards,


    • Marked as answer by HZ.USA Wednesday, September 9, 2015 11:48 AM
    Wednesday, September 9, 2015 8:01 AM