NET 4.5升级后缺少System.Web.Http [英] System.Web.Http missing after .net 4.5 upgrade

查看:116
本文介绍了NET 4.5升级后缺少System.Web.Http的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用 Target Framework Migrator 将解决方案升级到.net 4.5。 ,然后使用软件包管理器控制台命令:

I've just upgraded my solution to .net 4.5 using Target Framework Migrator, and then the package manager console command:

Update-Package -Reinstall -IgnoreDependencies

在我的一个项目中,我正在使用:

In one of my projects I am using:

using System.Web.Http.Controllers;
using System.Web.Http.Filters;

代码使用 HttpActionContext ReflectedHttpActionDescriptor 。我注意到 System.Web.Http 已从我的引用中删除,并且在添加新引用窗口中不再可用。

The code uses HttpActionContext and ReflectedHttpActionDescriptor. I notice that System.Web.Http has been removed from my references, and is no longer available in the Add New Reference window. What's going on?

推荐答案

您是否查看了添加新引用的扩展部分,而不是框架?

Have you looked in the Extensions part of the "Add new reference", instead of Framework ?

如果不存在,则位于NuGet的Microsoft.AspNet.WebApi.Core程序包中。

If it's not there, it's in the Microsoft.AspNet.WebApi.Core package on NuGet.

这篇关于NET 4.5升级后缺少System.Web.Http的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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