Search code examples
visual-studioasp.net-corewcfasmx

Consume ASMX webservice in Visual studio for mac


How can I reference a ASMX web service (WCF) in visual studio Mac, so that Client classes are generated automatically?

Connected services only offer "openAPI" and "gRPC" services, but no option for ASMX or WSDLs.

How can I reference classic WSDL/SOAP webservices?

I have a .net core Webapplication project on visual studio 2022 for mac (17.0.2 build 8)


Solution

  • As this answer says:This is not currently supported in Visual Studio for Mac.

    The code that was being generated, when adding a Web Reference, was using System.Web.Services which could not be compiled with a .NET Core or .NET Standard project so the ability to add web references was removed for these types of projects.

    Service references are not currently supported in Visual Studio for Mac. enter image description here

    Maybe you can try the dotnet svcutil command line tool, which can be used to generate service references. https://learn.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil-guide?tabs=dotnetsvcutil2x