我完全是一个Ninject
的新手,我试图按照Shiju Varghese在his blog post about DI的教程。Ninject 2缺少RegisterAllControllersIn?
我没加ninject.dll和Ninject.Web.Mvc.dll 但参考,我被困作为Visual Studio中无法解析功能RegisterAllControllersIn ....
protected override void OnApplicationStarted()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
// RegisterAllControllersIn could not be found!!
RegisterAllControllersIn(Assembly.GetExecutingAssembly());
}
我使用Visual Studio 2010 Prof
,.Net 4
,MVC2
,Ninject 2.0.0.0/2.0.1.0和Ninject Web.mvc extension
您现在如何从其他程序集注册控制器?它也能自动工作吗? – 2011-01-27 18:47:15