I have run into ...I don't think I would call it a problem as much as I would a quirk. It confuses and confounds me.
I am adding Ninject to my site. It works fine. No questions about troubleshooting Ninject specifically, but I encountered this when setting up my modules...
Here is my SessionModule.cs file.
namespace Lightcast.Web.Mvc.Injection.Modules {
public class SessionModule : Ninject.Modules.NinjectModule {
public override void Load() {
}
}
}
Also shown in this screenshot.

I get the error
Unknown type 'Modules' of Lightcast.Web.Mvc.Injection.Ninject
Now if I change it to this ...

It works just fine. So obviously there is a namespace collision. What I do not understand is why? I have never encountered this before. It just seems like the absolute oddest thing to me.
The reason seems to be that somewhere in your project a namespace or type named Lightcast.Web.Mvc.Injection.Ninject exists that hides the global NInject namespace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With