Asp.Net Webforms constructor injection with Ninject

323 Views Asked by At

When I try installing Ninject.Web I get:

Unable to resolve dependencies. 'Ninject 3.3.4' is not compatible with 'Ninject.Web 3.2.1 constraint: Ninject (>= 3.2.0 && < 3.3.0)'

In this SO answer, it is said that we don't have to use Ninject.Web. But without it I can't inject dependencies for a regular WebForms page in the constructor.

So how should I inject dependency into a regular webforms page if I can't install Ninject.Web together with the latest Ninject package? And I don't want to downgrade Ninject module to a previous version.

0

There are 0 best solutions below