【发布时间】:2018-05-04 21:42:47
【问题描述】:
我想在 .NET Standard 项目中执行“添加服务引用”。(Visual Studio 2017)
为了使 WCF 访问成为可能,我在 NuGet 上安装了“System.ServiceModel.Http”和“System.ServiceModel.Security”。
但是,.NET Standard 项目中没有“添加服务引用”菜单项。 如何添加服务引用?
.NET Framework项目中存在,.NET Standard项目中不存在,所以有问题。
【问题讨论】:
-
在解决方案资源管理器中右键
references,选择Add service reference。 -
可惜那个版本没有这个东西,你可以用这个吗? marketplace.visualstudio.com/…
-
右键“引用”-->“添加服务引用”只能.NET Framework项目。在 netstandard 项目中,它不能。
-
github.com/dotnet/announcements/issues/70 命令行工具是另一种选择。
标签: c# asp.net .net wcf .net-standard