My normal approach is:
Define a way to discover types in each individual assembly. Easiest approach (if you do not mind referencing Autofac in each) is to put an Autofac
Module
in each assembly. If you do not like that, you can define your own discovery abstraction (for example, MEF-like attributes).Discover all assemblies. Easiest approach is to scan the
bin
folder, but you can use some custom configuration. I haven't checked latest versions of Autofac add anything in terms of module discovery, but previously I did it manually.Use previously defined type discovery approach to register all relevant types from each discovered assembly.