简体   繁体   English

在Visual Studio for Mac中添加Web参考

[英]Adding a web reference in visual studio for mac

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. 我想在Visual Studio for Mac'Community'Edition(7.8.3)Build 2的ASP.NET Core 2.2项目中添加Web服务引用。从一个答案中,我读到了Visual Studio for Mac中的.NET Core中的Add Service Reference。 ,右键单击我的项目会显示“添加”命令,但是我看不到要在其下添加Web参考的任何地方。 All I see is to Add Nuget Package, file, folder, and docker support. 我所看到的只是添加Nuget软件包,文件,文件夹和docker支持。

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. 请记住,我没有使“添加Web参考”命令不出现在我的Web项目中的“添加”上下文菜单下。

I've tried downloading Visual Studio for Mac 'Professional' Edition, but clicking on the download link on the website, still downloads the 'Community' Edition. 我曾尝试下载Visual Studio for Mac“专业版”,但单击网站上的下载链接,仍会下载“社区版”。

My context menu screenshot 我的上下文菜单屏幕截图

This is not currently supported in Visual Studio for Mac. Mac的Visual Studio当前不支持此功能。

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. 添加Web引用时生成的代码使用的是System.Web.Services,无法使用.NET Core或.NET Standard项目进行编译,因此对于这些类型的项目,删除了添加Web引用的功能。

Service references are not currently supported in Visual Studio for Mac. Visual Studio for Mac当前不支持服务引用。

There is a dotnet svcutil command line tool you can use to generate service references. 有一个dotnet svcutil命令行工具可用于生成服务引用。 Not sure if you can use that instead, depending on what web service you are trying to use. 不知道是否可以使用它,这取决于您尝试使用的Web服务。

To have support for service references in Visual Studio for Mac probably the best thing would be to open a feature request for it. 要在Visual Studio for Mac中支持服务引用,最好的办法是为其打开功能请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM