I had code that scanned the bin directory of my application for assemblies that had not yet been loaded into AppDomain, and downloaded them. It basically looked like this:
foreach (var assemblyPath in Directory.GetFiles("path\to\bin", "*.dll")) { var inspected = Assembly.ReflectionOnlyLoadFrom(assemblyPath); Assembly.Load(inspected.GetName()); }
I missed the try / catch clauses, etc. to be short.
This allowed me to remove assemblies in the bin folder at run time with implementations for specific interfaces and let the IoC container automatically pick them up. Now with the new Roslyn magic, there is no longer a physical DLL when debugging. Is there a way to get assembly names, project names, or dependency names (in project.json ) dynamically.
I think I need to implement something like this example in the Entropy repository , but I donβt know how to implement it for my scenario.
source share