Could not load file or assembly 'System.Web.Http 4.0.0 after update from 2012 to 2013

前端 未结 28 1223
悲哀的现实
悲哀的现实 2020-11-28 01:09

I did the upgrade according to. http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2

I get the er

28条回答
  •  余生分开走
    2020-11-28 01:55

    This might help someone.

    I decided to go with MVC4 app.

    run project, worked

    Then Installed few packages like,
    Microsoft ASP.NET WEB API 2.2 (4 packages)
    Microsoft ASP.NET WEB API 2.2 Help Page
    Microsoft ASP.NET WEB API 2.2 OWIN

    run project, same error as mentioned in question

    Solution:

    In web.config

     
          
          
          
          
            
            
     
    


    Problem Solved


    but then, some hotfix error found, To resolve it, go to VIEW folder of your MVC4 project, find second web.config file and changed version from 2.0.0.0 to 3.0.0.0 as shown below.


    
        
          

提交回复
热议问题