c# - Autofac won't resolve class from external dll -


i'm trying create application utilizes autofac , loads external dlls. following code works, if dll located in same folder , program ran same folder:

builder.registerassemblytypes(assemblies.toarray()).             where(t => typeof(iimageconverter).isassignablefrom(t)).             instanceperlifetimescope().asimplementedinterfaces(); 

now if try run program different location set working directory directory dll located, autofac finds , loads dll, doesn't resolve run it:

using (var scope = _container.beginlifetimescope()) {     var processors = scope.resolve<ienumerable<iimageconverter>>();     foreach (var process in processors)         process.process(); } 

those autofac lines have. interface defined in shared library , each module implements default. missing?

thanks in advance!

it depends on values assigned assemblies. autofac not load dlls, scans loaded assemblies.

read dynamicic module loading determine how load external dlls.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -