I am adding Ninject in MVC project using the following commands in Package Manager Console:
Install-Package Ninject -version 3.0.1.10
Install-Package Ninject.Web
I have a Microsoft ASP.NET Web API 2.2
project which use Ninject.
To fix the problem, I have to install NuGet Package Microsoft ASP.NET MVC 4
for my project because Ninject requires System.Web.Mvc
. By doing so, Visual Studio will add System.Web.Mvc
to project's reference.
Also, you should set Copy Local
= True for the property of System.Web.Mvc
reference, so the DLL will be copied to Bin
folder. The DLL does not come with standard .NET Framework. It is part of the ASP.NET MVC Package.