I need to register some type(s) e.g MyHandler: IRequest in autofac. These types resides in an assembly 'A' that is not referenced so far and hence not loaded in appdomain. I tried to load assembly 'A' using Assembly.LoadFile(path), it gets loaded in app domain, but later this same dll is loaded in appdomain again by .net runtime and there are two instances of 'A' in app domain, which is a problem in my scenario. using Autofac registration soure won't help either. I just want to know to prevent loading of 'A' by runtime, as I have already loaded it.
1
votes