title: Convention based binding in Ninject 3.0
body: <p>I'm trying to setup Ninject on my new project and I want to scan assembilies using convetions so that </p>
  
  <pre><code>IFoo
  </code></pre>
  
  <p>will automatically resolve to </p>
  
  <pre><code>IBar
  </code></pre>
  
  <p>All the samples and documentation describes using this approach</p>
  
  <pre><code>kernel.Scan(...)
  </code></pre>
  
  <p>while the Ninject 3 Kernel seems to use .Load instead. If I'm using Load for scanning then how do I configure scanning with conventions?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I was able to get it working using: <a href="https://github.com/ninject/ninject.extensions.conventions/wiki/What-is-configuration-by-convention" rel="nofollow">https://github.com/ninject/ninject.extensions.conventions/wiki/What-is-configuration-by-convention</a></p>
  
  <p>However, now I can't get my modules to load. I'm using the code below and getting the error below.</p>
  
  <pre><code>    IKernel kernel = new StandardKernel();
      kernel.Bind(x =&gt; x
          .FromAssembliesMatching("Crt.*.dll")
          .SelectAllTypes()
          .BindAllInterfaces()
          );
      kernel.Load("*.dll");
      return kernel;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Ninject.ActivationException was unhandled
    Message=Error activating ITrainingEngine
  More than one matching bindings are available.
  Activation path:
    1) Request for ITrainingEngine
  
  Suggestions:
    1) Ensure that you have defined a binding for ITrainingEngine only once.
  
    Source=Ninject
    StackTrace:
         at Ninject.KernelBase.Resolve(IRequest request) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:line 380
         at Ninject.ResolutionExtensions.GetResolutionIterator(IResolutionRoot root, Type service, Func`2 constraint, IEnumerable`1 parameters, Boolean isOptional, Boolean isUnique) in c:\Projects\Ninject\ninject\src\Ninject\Syntax\ResolutionExtensions.cs:line 263
         at Ninject.ResolutionExtensions.Get[T](IResolutionRoot root, IParameter[] parameters) in c:\Projects\Ninject\ninject\src\Ninject\Syntax\ResolutionExtensions.cs:line 37
         at Crt.BlackBox.Train.Program.Run() in C:\code\Crimson\CRT\readmission\src\Crt.BlackBox\Crt.BlackBox.Train\Program.cs:line 54
         at Crt.BlackBox.Train.Program.Main(String[] args) in C:\code\Crimson\CRT\readmission\src\Crt.BlackBox\Crt.BlackBox.Train\Program.cs:line 24
         at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
         at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.ThreadHelper.ThreadStart()
    InnerException: 
  </code></pre>