I am working on a project with MVC4, and have decided that I wish to add some dependency injection via Ninject. After download/install via NuGet, I find this error in the NinjectWebCommon.cs
(Line 23):
The type 'System.Web.IHttpModule' is defined in an assembly
that is not referenced. You must add a reference to assembly
'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
and then a bit later (line 44):
The type or namespace name 'IHttpModule' could not be found
(are you missing a using directive or an assembly reference?)
I expect that this Normally works, but that I've done something that doesn't work when adding Ninject to the project after the fact.
Edit: The above errors are only thrown by the test project....
Make sure you specify the System.Web reference in both the main and test project. The test projects have their own list of references to maintain. I expect you don't have System.Web in the test project.
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