Could not load file or assembly System.Web.Mvc or one of its dependencies

前端 未结 3 1435
无人及你
无人及你 2021-02-14 02:44

currently working on asp.net mvc5 (old mvc3 project). It builds just fine, but when I start the project but when I run the project I am facing the following error.



        
3条回答
  •  失恋的感觉
    2021-02-14 03:27

    Could you post your web.config file here?. It seems that you opened a mvc3 project in a newer environment and the migrating function of your IDE (i.e. Visual Studio) doesn't work well. The versions of System.Web.Mvc.DLL are mismatched (in config file and the one in bin/ directory). There are two ways to solve this: 1. Modify the version of System.Web.Mvc package/assembly in the config file. 2. Copy System.Web.Mvc.dll from your old project to the new project (bin/ folder).

    I had faced the similar issue for other .dll files before. At that time, I chose to delete all .dll files and use NuGet Package Manager to download them again.

提交回复
热议问题