I'm working on a plug-in system and users are very likely to present new assemblies containing classes identically named right down to the namespace because they are installing a newer version of something already installed.
What is the expected behaviour when you load an assembly that contains classes already defined by other assemblies already loaded?
In DNFX this was clearly defined by AppDomains but they have been replaced in netcore by AssemblyLoadContexts which are not assembly execution contexts.
When I load the same assembly twice no exception is reported but I'd like to know whether I have replaced the classes or had no effect, and any other semantics of this. Suggested research terms or links to relevant documentation would be very welcome with your answer.
So far I've found this: https://github.com/dotnet/runtime/issues/39783
It appears to say that using AssemblyLoadContexts you can load an assembly more than once, but it says nothing about what that means for two classes with identically full names, for code that instantiates them.
I suppose when I load an assembly object and explicitly use it to CreateInstance I will get the class defined in that assembly, but I would still like to see documentation on this.
question from:https://stackoverflow.com/questions/66058127/semantics-of-loading-an-assembly-more-than-once