Ninject in ASP.NET MVC4

前端 未结 8 2060
终归单人心
终归单人心 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 04:05

    I am using DD4T, and encountered same error.

    After confirming that all packages are installed by nuget package manager, I found that some of the DLLs/references were missing (newtonsoft etc):

    Then, after re-installing Newtonsoft.Json (to re-install package use following command in Nuget Package Manager:Update-Package –reinstall Newtonsoft.Json), and putting netrtsn.dll from Tridion Deployer bin, I got this error - "Sequence contains no elements" with exactly same stack trace as given in this question.

    Thanks to Naga, for providing this resolution deleted NinjectWebCommon.cs (the generated file, as the integration already exists in global.ascx.cs file), and wohooooo!!!! all errors resolved, Tridion + MVC4 = DD4T is running fine now.

提交回复
热议问题