如何在 .NET 5.0 中添加 soap Web 服务作为参考

How can I add soap web service as reference in .NET 5.0

当我尝试使用 Microsoft WCF Web 服务引用提供程序时出现此错误:

the connected services component 'Microsoft WCF Web Service Reference Provider' failed (HRESULT:0x80131500) The target framework 'net5.0-windows' is not supported .NET Core, .NET Standart, or a .NET Framework version. The minimum supported framework versions are as follows: netcoreapp 1.0, netstandart 1.3 and net4.5

如何添加网络服务链接?

我把csproj文件里的net5.0-windows改成了net5.0。添加了 webservice 引用,然后将 csproj 文件改回 net5.0-windows。这解决了它。