System.Web.Http missing in .net Core 2.1(.net Core 2.1 中缺少 System.Web.Http)
问题描述
我的 .net core 2.1 项目中缺少 System.Web.Http.
System.Web.Http is missing in my .net core 2.1 project.
错误状态
错误 CS0234 名称空间System.Web"中不存在类型或名称空间名称Http"(您是否缺少程序集引用?)
Error CS0234 The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
请参考图片以获得更清晰
please refer the image for more clarity
推荐答案
System.Web.Http 在 dotnet core 中不可用,但可以通过安装以下 nuget 包来引用:Microsoft.AspNetCore.Mvc.WebApiCompatShim.dll.这将清除错误.
System.Web.Http is not available in dotnet core, but may be referenced by installing the following nuget package: Microsoft.AspNetCore.Mvc.WebApiCompatShim.dll. This will clear the error.
来源:https://docs.microsoft.com/en-us/dotnet/api/system.web.http.httperror?view=aspnetcore-2.1
这篇关于.net Core 2.1 中缺少 System.Web.Http的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:.net Core 2.1 中缺少 System.Web.Http
基础教程推荐
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 将数据集转换为列表 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 如果条件可以为空 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
