title: Dynamically load assemblies in ASP.NET 5
body: <p>I used to have some code which scanned the <code>bin</code> directory of my application for assemblies which weren't loaded in the AppDomain yet and loaded them. It basically looked like:</p>
  
  <pre><code>foreach (var assemblyPath in Directory.GetFiles("path\to\bin", "*.dll"))
  {
      var inspected = Assembly.ReflectionOnlyLoadFrom(assemblyPath);
      Assembly.Load(inspected.GetName());
  }
  </code></pre>
  
  <p><em>I skipped the try/catch clauses, etc for brevity.</em></p>
  
  <p>This allowed me to drop assemblies in the bin folder at run-time with implementations for certain interfaces and let the IoC container pick them up automatically. Now with the new Roslyn magic, there are no physical DLL's anymore when debugging. Is there any way to retrieve assembly names, project names or dependency names (in <code>project.json</code>) dynamically.</p>
  
  <p>I guess I have to implement something like <a href="https://github.com/aspnet/Entropy/blob/dev/samples/Runtime.CustomLoader/Program.cs" rel="nofollow">this example in the Entropy repo</a>, but I don't know how to implement it for my scenario.</p>