1
votes

I am trying to use Ninject with a new API project that targets .net Core 2.1
I get this warning when ever I reference the library using nuget

"Package 'Ninject.Web.Common.WebHost 3.3.1' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project."

I'm assuming the libraries havent caught up yet, or maybe I'm missing something. Am I just out of luck or is there a workaround.

Thank you in advance

1

1 Answers

0
votes

There's nothing like that. This package is based on old ASP coming from .net framework, but .net core brings completely new ASP framework with its own DI container, hence this package is no longer compatible. If you want to still use Ninject container in asp.net core instead of default one check this: How to integrate Ninject into ASP.NET Core 2.0 Web applications?