Ninject 4 and netcoreapp1.1 (deprecated?)

Skip to first unread message

Steven Confessore

Apr 9, 2017, 9:01:54 PM4/9/17
to ninject
Okay, so I started working with DotNet/Core in order to be able to build and run applications on a Linux server.

I went to download Ninject from NuGet and got an error that Ninject 3 is not supported by netcoreapp1.1.

I downloaded Ninject 4 and went to implement the StandardKernel and received an error stating that it is deprecated and that I should use StandardKernelConfiguration and StandardReadonlyKernel.

I tried to use these but was met with "that does not exist, would you like to create the class?"

How do I use Ninject 4? Can someone hold my hand and walk me through this?

Thank you!

Jun 26, 2017, 6:53:50 AM6/26/17
to ninject
The Obsolete comment is out of date. The classes are just called KernelConfiguration and ReadonlyKernel without 'Standard' prefix.

var readonlyKernel = new KernelConfiguration(new NinjectModule(settings)).BuildReadonlyKernel();


Assil Abdulrahim

Mar 29, 2018, 4:33:33 PM3/29/18
to ninject
            var readonlyKernel = new KernelConfiguration(new Bindings()).BuildReadonlyKernel();
Where Bindings is a subclass of "NinjectModule"

I am new to NInject but this is what worked for me.
Reply all
Reply to author
0 new messages