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

后端 未结 7 965
名媛妹妹
名媛妹妹 2021-02-18 13:56

I am adding Ninject in MVC project using the following commands in Package Manager Console:

Install-Package Ninject -version 3.0.1.10
Install-Package Ninject.Web         


        
相关标签:
7条回答
  • 2021-02-18 14:33

    I was facing this issue with my application.

    In my solution, we had a web application project and a web-api project. The web application was consuming the web-api.

    The fix for my issue was that the Mvc dll version in the Web application was different from that of the web-api project. So, whenever I was trying to hit the web-api, it was throwing up error. I just ensured that both the projects have the same Mvc dll version and things started working fine. You can use NuGet Package Manager for this.

    Just mentioning it for the reference of others who might be facing a similar scenario.

    0 讨论(0)
提交回复
热议问题