Reputation: 16261
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.
Upvotes: 1
Views: 5109
Reputation: 16261
For .net core i had to use dotnet 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.
Upvotes: 0
Reputation: 1520
If you use Visual Studio 2022, you have to download the tool.
dotnet tool install --global dotnet-svcutil
Then, run command
dotnet-svcutil <WCF-WEB-URL>
Upvotes: 0
Reputation: 821
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.
Upvotes: 0