Home > Software design >  Svcutil Configuration files are not supported.net core
Svcutil Configuration files are not supported.net core

Time:03-28

I am using svcutil to get wcf service into my project.

But i get error while trying to initialize the soapClient:

ServiceSoapClient client = new ServiceSoapClient();

Here is the error:

Configuration files are not supported

I use this command to get it to my project:

svcutil myUrl.asmx /out:name.cs/config:name.config

I copied all the generated config content into my web.config file.

But without success.

CodePudding user response:

WCF proxies generated by svcutil do not support loading from separate configuration files or System.Configuration.Configuration objects.

You can add a wcf service reference using the WCF Web Service Reference Provider tool.

Currently because wcf is not ported to .net core. Microsoft recommends using gRPC instead.

CodePudding user response:

For .net core i had to use dontent svcutil and NOT just svcutil.

In cmd I use: dotnet svcutil myUrl.admx

For making it sync(as default it rendered as async) use:

dotnet svcutil myUrl.admx --sync

Now. You can wrap the rendered reference.cv with your namespace if you want.

  • Related