I want to add a wsdl service to my ASP Core 1.1 app
First I used 'Microsoft WCF Web Service Reference Provider' Extension but got an error that I described it here:
https://github.com/dotnet/wcf/issues/2258
But as a alternative solution I tried to use 'SvcUtil.exe' and successfully generated a .cs file and also a output.config file.
For simplifying the problem first I tried to use these files in a DotNetFramework Console App: after adding .cs file I got lot's of errors due to missing of nuget packages. after searching I added missing nuget packages and also added the output.config
Then I tried this solution for a DotNetCore Console App: I added missing nuget packages but there is no App.config file in DotNetCore apps so was not able to use the config file. Then I run the app and got this error while calling the service:
System.PlatformNotSupportedException: 'Configuration files are not supported.'
Is there any alternative way to config service model for dot net core apps?
This is the output.config file that is generated by SvcUtil.exe:

@hmdhasani Dotcore is code based currently. It's not possible to configure it via a configuration file.
@hongdai Is there any way to turn the configuration as code?
@hmdhasani Yes, there is an extension point that you can add code to configure the client behavior. Please take a look at the blog: https://blogs.msdn.microsoft.com/webdev/2017/06/28/wcf-web-service-reference-mex-authentication.
@hongdai hi, I met the same problem.Is there any method possible to configure it via a configuration file now?
same here, any workaround? we have legacy services and we need to consume them in out .netcore application
There was some guidance in another thread to reference System.ServiceModel.Primitives, however, this didn't fix this issue for us. So any guidance on this issue would be appreciated:
https://github.com/dotnet/wcf/issues/2293
Same problem here.
@hongdai why this thread is closed? IMHO this is important functionality.
@dgroh this looks like a workaround https://www.seeleycoder.com/blog/using-wcf-with-dotnetcore/
I did not test it, but looks promising
Most helpful comment
@hongdai hi, I met the same problem.Is there any method possible to configure it via a configuration file now?