I have couple of class libraries in my project and all are using Ninject IoC container. I wanted to load all the modules in a StandardKernel at one go
Ninject
StandardKernel
You can use reflection to find and instantiate the Ninject modules:
BuildManager.GetReferencedAssemblies() .Cast() .SelectMany(a => a.DefinedTypes) .Where(t => typeof(INinjectModule).IsAssignableFrom(t)) .Select(t => (INinjectModule)Activator.CreateInstance(t))