How do I work with Ninject in an ASP.NET MVC Web App?

后端 未结 3 1757
时光取名叫无心
时光取名叫无心 2021-02-12 04:14

I\'ve created a new MVC Web application and I have references to Ninject.dll, Ninject.Web.Common.dll and Ninject.Web.MVC.dll.

Global.asax.cs:

         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-12 04:42

    Be sure you are not referencing a project which also uses the NinjectMVC3 App_Start. After removing the reference to such, my project started working. Also, as said before, check the namespaces all match and are correct.

提交回复
热议问题