Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0' or one of its dependencies

跟随精通Asp.Net MVC 5 Adam Freeman 第七章SportsStore出现的错误


因为版本的问题,通过可视化的NuGet包管理器解决了

  1. In your project tree in VS, right-click References and go to Manage NuGet Packages.
  2. Go to Online, nuget.org and search for ninject.
  3. Install Ninject, Ninject.Web.Common and Ninject.MVC5 (the book says to install MVC3).
  4. In the Manage NuGet Packages menu (from step 1), go to Updates, nuget.org.
  5. Update all modules, especially Microsoft ASP.NET MVC.
根据每个项目的需要直接搜索ninject(第3步),安装那三个内容,nuget会删除过时的包 【Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0' or one of its dependencies】
之后就是升级所有模块


参考:http://stackoverflow.com/questions/24028580/could-not-load-file-or-assembly-system-web-mvc-version-3-0-0-0-or-one-of-its

    推荐阅读