I've read several articles regarding the setup of Ninject for MVC3 projects.
Some say that your Global.asax.cs should inherit from NinjectHttpApplication, others register modules when constructing the StandardKernel via Application_Start().
I personally used NuGet and it went a different way creating a AppStart_NinjectMVC3 class, and starting it up using
[assembly: WebActivator.PreApplicationStartMethod(typeof(MyApp.AppStart_NinjectMVC3), "Start")]
Are there any advantages/disadvantages to each?
Ian and I have been quite busy regarding this topic during the last few days.
Ninject.Web.Mvc
andNinject.MVC3
have been merged. There are still the two ways to either derive fromNinjectHttpApplication
or to install the nuget package. But now they are based on the same code so that they have the same features. See my blogpost about more details:http://www.planetgeek.ch/2011/02/22/ninject-mvc3-and-ninject-web-mvc3-merged-to-one-package/