Ninject.MVC5 not generating NinjectWebCommon.Cs

后端 未结 9 1912
独厮守ぢ
独厮守ぢ 2021-02-12 11:50

I\'m developing a MVC5 project on Visual Studio 2017 Version 15.4. I\'m getting unexpected result here what I never faced before. I\'ve installed Ninject.MVC5 packa

相关标签:
9条回答
  • 2021-02-12 12:32
    1. Go to: "Manage nuget Packages" contect menu of the project.
    2. Select installed Pakages(You must have installed ninject.mvc5 by then)
    3. Update all associated ninject packages already installed. this could include:
      ninject.web.common, ninject, ninject.web.common.webhost

    and you are home with NinjectWebCommon.cs in your App_Start folder

    0 讨论(0)
  • 2021-02-12 12:33

    Install Ninject.MVC5 from Nuget package and keep version 3.2.1 In latest 3.3.0 version it was not adding NinjectWebCommon.cs file so I downgraded version and it has worked for me.

    Happy Coding!

    0 讨论(0)
  • 2021-02-12 12:33

    I was facing the same issue,for fixing this i changed the Ninject packages version to 3.2.2.(downgrade)By doing this NinjectWebCommon.cs will be generated.But on running the project it will give error,so switch again to earlier version of Ninject packages. And run the project.The project will run properly

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