December 22, 2020

WCF Proxy generation – using dotnet-svcutil

In the last post (WCF Proxy generation – using SvcUtil.exe) we have seen how to generate WCF proxy code using SvcUtil.exe.

In this post we will be looking into another option dotnet-svcutil.

This is a .NET Core CLI tool and is available cross-platform on Linux, macOS, and Windows.

Following are some of the reasons you may want to use dotnet-svcutil:

  • You can easily install it as NuGet package.
  • It will work even if you have a lower version of Visual Studio like the VS2017 (15.5 or less) version.
  • Since it is not bounded with Visual Studio version, you can also use it with free VS Code.
  • It is available cross-platform on Linux, macOS, and Windows.

From Visual Studio you can install using Nuget package manager as below:

Another option is to install it globally through the command line so that it can be used across the system.

You can use below command to install globally:

dotnet tool install --global dotnet-svcutil --version 2.0.2

Once installed, use this command to generate proxy code:

dotnet-svcutil https://localhost:8081/OrderManagement/OrderManagement.svc

This command will create a Reference.cs file within ServiceReference folder.

References:

Related Post(s):

1 comment:

  1. Thanks for sharing such a valuable information with us. Otherwise any one who want to learn python core to advance contact us on 9311002620 or visit :-https://www.htsindia.com/Courses/python/python-training-institute-in-south-delhi

    ReplyDelete