We have a common assembly which provides the ability to resolve, instantiate and manage the lifetime of services given an interface. We are using Unity to map the interface type to the implementation and have all the mappings stored a single container
in a configuration file associated with the assembly. We have discovered that when we use the Configure method of the UnityContainerElement to configure the container, all the assemblies involved in the mappings get loaded immediately.
This is problematic for us because not necessarily all the assemblies will be used at run time resulting in unused assemblies loaded in our process, and it's even possible that some of them may not be present. Currently, if an assemby is not present
an exception is throw while the container is configured.
Is there some way to avoid loading the assemblies until a call to Resolve is made? That way if the type is never used, the assembly would never be loaded.
If not, is there any way to skip mappings that involve assemblies which are not present?