ASP.MVC安装ninject库报错: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 Onlinenuget.org and search for ninject.
  3. Install NinjectNinject.Web.Common and Ninject.MVC5 (the book says to install MVC3).
  4. In the Manage NuGet Packages menu (from step 1), go to Updatesnuget.org.
  5. Update all modules, especially Microsoft ASP.NET MVC.

根据每个项目的需要直接搜索ninject(第3步),安装那三个内容,nuget会删除过时的包

之后就是升级所有模块

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

原文地址:https://www.cnblogs.com/liuslayer/p/8624842.html