In Ninject V1, ImplicitSelfBinding was a top-level configuration setting (which was true IIRC by default).
In V2, the implicit binding behavior you observe is more deeply connected (although there are ways to disable it - like most Ninject bits, it is very granular and minimal). In V2, the default behavior is that self-binding for specific types is always generated if there is no other binding. The only time you usually do Bind<Concrete>().ToSelf() is to set the binding, for example, to do .InSingletonScope() .
Take a look at this @Remo Gloor answer to disable it in V2 +.
Go do a grep in the source code right now for ImplicitSelfBinding at this point - it's a lot easier to read than rabbit people though!
Also be sure to take a look at Ninject.Extensions.Conventions and tests on ninject.org to host the implicit Bind() ing I*X* to *X*
(As Stephen said, Ninject will not snap to itself if you change your MyClass to abstract .)
Ruben bartelink
source share