Add new debug API for coreclr assembly resolution
VS debugger needs to locate assemblies that are not yet have been loaded in the debuggee as part of expression evaluation. For instance, couple cases where need to do this:
- We are in a context where real func eval is impossible (dump debugging for example) and during code interpretation we have to resolve a reference to an assembly that was not loaded at the time the dump was saved.
- To support some features like “Results View” for IEnumerable objects or inspection of C# “dynamic” objects, we sometimes need to instantiate types that live in modules that have not loaded yet. Currently we have to guess were these types live. For example, we have to guess that SystemCore_EnumerableDebugView lives in System.Core.dll as well as the location of System.Core.dll.
Coreclr assembly loading rules are quite complex and subject to change, therefore we need an API to get us the load path of a given assembly.
To clarify I'm only intending have the API target resolution from AssemblyRef -> path, and maybe support non-default load contexts if necessary. I'm not planning to assist with the mapping of type -> assembly. I'll be expecting the debugger to know what assembly has the type its looking for.
@noahfalk and @caslan do we need this work for rtm now?
I don't think so, as we discussed, with the shared framework our existing heuristics seem to handle most cases just fine. We can revisit this later if we run into it in a more common scenario.