I am using ninject in an asp.net web api project and started getting this intermittent ninject error:
" Error loading Ninject ICache component. This component has not been registered in the kernel component container. "
I use:
- Ninject 3.0.1.10
- Ninject.MVC3 3.0.0.6
- Ninject.Web.Common 3.0.0.7
All of them are included in my project with NuGet. I load my modules in IocConfig.RegisterIoc and have not made any other changes or settings.
It may be unrelated, but the problem arose around the same time when I started injecting IKernel into one of my constructors. I did not set the binding for this after reading about the “special recognizer”.
I read a number of similar questions here:
Ninject + "Error loading Ninject ICache component"
Ninject and ChildKernel in MVC3 project: "Error loading component" Component Initiative ", etc.
Ninject accidental exception: "Error loading Ninject ICache component"
Although in each of these cases the OP has the same error as me, the solution does not fit - I do not create child kernels, and I do not use the listening version of ninject.
asp.net-web-api ninject
Twisted
source share