Reputation: 897
I've pulled down a project onto my my machine that is using Web API. When I look at the nugget window it shows that I have web api 2.2
, the web host, the core libraries, the client libraries, the cross origin support, and Data v 1-3
.
However, when I try to build the project, I'm given the following errors:
The type or namespace name 'Cors' does not exist in the namespace 'System.Web.Http' (are you missing an assembly reference?) and
The type or namespace name 'HttpApplication' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Any help you guys and gals can give will be appreciated.
Upvotes: 3
Views: 2769
Reputation: 12875
I've had the same issue after I had Resharper add the CORS reference.
I fixed it by adding the correct nuget packages: Microsoft.AspNet.Cors
and Microsoft.AspNet.WebApi.Cors
.
Upvotes: 4