ASP.NET MVC 4 + Ninject MVC 3 = No parameterless constructor defined for this object

前端 未结 17 1537
猫巷女王i
猫巷女王i 2020-11-30 01:41

UPDATE - Please look at my answer for a link and explanation of the solution to this problem

Before we start, I know this is a very common quest

17条回答
  •  旧时难觅i
    2020-11-30 02:23

    I fixed mine by Removing Ninject MVC5 and installing Ninject MVC3, from Nuget.

    MVC5 == Ninject.MVC5
    MVC4 == Ninject.MVC3
    MVC3 == Ninject.MVC3
    

    Check the version of the System.Web.MVC in the references to be sure which version of MVC you are currently on.

提交回复
热议问题