问题描述
我刚刚使用 目标框架迁移器将我的解决方案升级到 .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 丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!