Something To Code

All about programming and information security

Could not load file or assembly ‘System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’

When creating a new MVC5 application using VS2013 I got the following error:

Could not load file or assembly ‘System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I tried the following, to no avail:

  • Updated the MVC 5 package (Nuget)
  • Uninstalled / installed MVC5 (Nuget)
  • Reviewed, then removed binding redirects in the web.config
  • Repaired VS2013 installation
  • Installed VS2013.4

What did help was:

Install-Package Microsoft.AspNet.WebApi

After this my MVC5 Application was running flawless.

Loading