In earlier versions of Ninject.Extensions.Conventions, it was pretty easy to scan a directory for assemblies, filter classes by interface and then load all containing ninject modules.
kernel.Scan(scanner =>
scanner.FromAssembliesInPath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))
scanner.AutoLoadModules();
scanner.WhereTypeInheritsFrom<IPlugin>());
public class MyPlugin : NinjectModule, IPlugin {
public override void Load() {
Bind<IRepositoryFromPluginHost>().To<MyPluginImpl>().Named("special");
}
}
However, after I updated lately to the newest release, everything seems gone and I'm unable to
- Auto load modules
- Filter types by interfaces
Does anybody have a solution for this?