It needs the system.web.http.webhost which is part of this package. I fixed this by installing the following package:
PM> Install-Package Microsoft.AspNet.WebApi.WebHost
or search for it in nuget https://www.nuget.org/packages/Microsoft.AspNet.WebApi.WebHost/5.1.0
None of these ideas helped my project using MVC 5.2.2.
Forcing a reinstall corrected the problem. From the NuGet package manager console:
update-Package -reinstall Microsoft.AspNet.WebApi.WebHost
GlobalConfiguration
class is part of Microsoft.AspNet.WebApi.WebHost
nuget package...Have you upgraded this package to Web API 2?
As well as using Package manager console to get nuget to update the project with Install-Package Microsoft.AspNet.WebApi.WebHost for missing GlobalConfiguration,
I needed Install-Package Microsoft.AspNet.WebApi.SelfHost for missing using System.Web.Http;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With