Ninject in ASP.NET MVC4

前端 未结 8 1943
终归单人心
终归单人心 2021-02-07 03:19

So after much screwing around I finally got Ninject wired in and compiling in my MVC4 application. The problem I was running into is the IDependencyScope interface no longer ex

8条回答
  •  不思量自难忘°
    2021-02-07 03:52

    I have also had this problem when I used nuget to install Ninject.MVC4 in a project referenced by my actual MVC website project.

    The trouble is that the NinjectWebCommon.cs file automatically installed in the App_Start directory of the referenced project conflicts with the (actual, useful) one installed in my website project. Removing the NinjectWebCommon.cs file from the referenced project resolves the error.

提交回复
热议问题