Ninject.MVC5 not generating NinjectWebCommon.Cs

后端 未结 9 1930
独厮守ぢ
独厮守ぢ 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条回答
  •  猫巷女王i
    2021-02-12 12:19

    This trick worked for me:

    1. First downgrade all Ninject related package dependencies to version 3.2.0.
    2. Now you will be having the NinjectWebCommon.cs file in App_Start.
    3. Edit the file as per your requirement.
    4. Visit Package Manager UI, it will automatically start to ask you to upgrade all Ninject dependencies to latest one, do it!

    Your NinjectWebCommon.cs file will remain intact! Happy coding!

提交回复
热议问题