Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
800 views
in Technique[技术] by (71.8m points)

asp.net mvc - System.Web.Http missing after .net 4.5 upgrade

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;

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...