WCF uses SvcUtil.exe to generate client code and configuration

Source: Internet
Author: User

Reference Address: http://www.cnblogs.com/iamlilinfeng/p/4083827.html

SvcUtil.exe is a vs command-line tool located at: C:\Program Files\Microsoft Sdks\windows\v7.0a\bin or C:\Program Files (x86) \microsoft SDKs \windows\v7.0a\bin\ generally we add SvcUtil.exe to the VS development tool for later use (or you can use the command line tool directly).

1) In the Tools menu in vs---select external tools and open the Admin window as shown in:

In the title input Svcutil,command Select SvcUtil.exe full path, Initial directory bar to select the generated client code and configuration file to put the directories (here is the solution directory), select Prompt for Arguments, do not select close on exit. Click OK.

2) Once added, this menu will appear under the VS tool. As shown in the following:

3) Add a reference to the service on the client side. Open the Svutil tool and fill in the arguments with the address of the service, such as:

After clicking OK, the code class and configuration file generation succeeds (under the solution target), as shown in:

At this point the proxy class and configuration file are downloaded to the physical directory of the solution as shown in:

WCF uses SvcUtil.exe to generate client code and configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.