2

I want to add a web service reference in my ASP.NET Core 2.2 project in Visual Studio for Mac 'Community' Edition (7.8.3) Build 2. From an answer I read Add Service Reference in .NET Core in Visual Studio for Mac, right clicking on my project reveals an Add command, however I do not see anywhere to add a web reference under it. All I see is to Add Nuget Package, file, folder, and docker support.

Please what I'm I missing that is not making the Add Web Reference command appear under the Add context menu in my web project.

I've tried downloading Visual Studio for Mac 'Professional' Edition, but clicking on the download link on the website, still downloads the 'Community' Edition.

My context menu screenshot

  • This is what your Project context menu should look like: https://csharpcorner-mindcrackerinc.netdna-ssl.com/article/first-app-with-visual-studio-for-mac/Images/image015.png - please post a screenshot of yours for comparison. – Dai Mar 24 '19 at 08:44
  • @Dai, I've added the screenshot of my context menu. I can see the Add Web reference in yours, but I can't see it in mine. –  Mar 24 '19 at 09:05

1 Answers1

4

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.

There is a dotnet svcutil command line tool you can use to generate service references. Not sure if you can use that instead, depending on what web service you are trying to use.

To have support for service references in Visual Studio for Mac probably the best thing would be to open a feature request for it.

Matt Ward
  • 47,057
  • 5
  • 93
  • 94