asp.net-web-api2ninject.web.mvc

NinjectWebCommon.cs file is not adding after install ninject nuget package


I am using one web api application where i need to add ninject for dependency injection. I have gone through this Link where steps is mentioned one by one to use ninject. Currently i am using MVC 5 so for that i found ninjectMVC5 in nuget. I installed it but according to this link i should have get NinjectWebCommon.cs file in App_Start folder but did not get any file there to register our component.

I uninstalled all the ninject packages and found another link and followed there steps but still ninjectwebcommon.cs file is not finding in app_start folder.

Can someone explain here what i am doing wrong?

Thanks,

Vikash


Solution

  • This issue on github says that downgrading Ninject to version 3.2.3 should resolve the issue. Another option is to add the NinjectWebCommon.cs manually.