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

后端 未结 8 1040
南方客
南方客 2020-12-09 02:34

In Visual Studio 2012 I created an ASP.NET MVC 4 project where the target framework is the .NET Framework 4.5. When I deployed my project to a web server it gave the followi

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-09 03:33

    I had this error with an old project that I was going back to do a bit of work on. It turns out the project wasn't actually using WebApi so I uninstalled Microsoft.AspNet.WebApi using NuGet. That solved the problem for me.

    If I'd actually have needed WebApi I'm sure installing it again would have fixed the error too.

提交回复
热议问题