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

后端 未结 8 1050
南方客
南方客 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:21

    I had the same issue today during deployment. I was able to fix it by marking the assembly to be copied to the deployment file.

    In order to do this, in my Visual Studio project, select the System.Web.Http.Webhost assembly in your references and alter the 'Copy Local' property to True. I had to repeat this for a few other assemblies that were missing.

    Thanks to this website for the tips - http://haacked.com/archive/2008/11/03/bin-deploy-aspnetmvc.aspx/

提交回复
热议问题