System.Web.Services发生了什么? [英] what happend to System.Web.Services?

查看:345
本文介绍了System.Web.Services发生了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

我最近的一个现有asp.net核心应用无法重建错误: 

One of my existing asp.net core app recently failed to rebuild with error: 

错误  CS0234 命名空间'System.Web'中不存在类型或命名空间名称'Services'(您是否缺少程序集引用?) 

Error CS0234 The type or namespace name 'Services' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) 

它指向代码: 

It points to code: 

使用System.Web.Services;

使用System.Web.Services.Protocols;

using System.Web.Services;
using System.Web.Services.Protocols;

我尝试通过添加引用UI重新加载system.web.services.dll,但不断收到错误信息: 

I tried to reload the system.web.services.dll by add reference UI, but keep getting error msg: 

引用无效或不受支持。  ;

The reference is invalid or unsupported. 

发生了什么事?

我正在使用VS2017社区构建应用程序。 

I'm building the app with VS2017 community. 

推荐答案

嗨朋友,

欢迎来到MSDN论坛。

Welcome to MSDN forum.

>> 引用无效或不适用orted。 
发生了什么?

>>The reference is invalid or unsupported. What's happening?

由于仅在
.net framework
而不是.net core。你可以看看这个
类似问题
。我假设可能存在兼容性问题。

Since System.Web.Service is supported only in .net framework instead of .net core. You can have a look at this similar issue. I assume there might exist compatibility issues.

那么该应用程序一旦与这些命名空间一起运行良好吗?您的应用程序所针对的.net核心版本是什么?以及哪个版本的System.Web.Service.dll?

So does that app once works well with these namespace? What .net core version your app targets? And which version of the  System.Web.Service.dll?

我已经创建了一个.net core2.2应用程序并手动添加了System.Web.Service.dll(目标.net4.7.2)。奇怪的是构建成功!所以可能会有特定的组合。 net core app和dll可以工作。你可以创建一个新的项目来检查它。

I've create a .net core2.2 app and add the System.Web.Service.dll(target .net4.7.2) manually. Strangely the build succeeds! So maybe come combination of specific .net core app and the dll may work. You can create a new project to check it.

另外,如果它仍然存在,你能否请与项目类型分享更多细节,目标版本的项目和System.Web.Service.dll帮助研究它。如果你可以通过一个驱动器在这里共享一个简单的示例项目,那么可以更好。我们可以直接检查

Also, if it persists, could you please share more details with the project type, target version of project and the System.Web.Service.dll to help research it. And it could be much better if you can share a simple example project here by one-drive so that we can check it directly.

最好的问候

Lance


这篇关于System.Web.Services发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆