As a .NET developer, the line
'<process name>' (Managed): Loaded 'Anonymously Hosted DynamicMethods Assembly'
probably is familiar to you. My question is simple and straightforward: what exactly is this 'Anonymously Hosted DynamicMethods Assembly' and can I make it (pre)load manually? If so, how? Can this be done via Assembly.Load(...)?
System.Reflection.Emit contains classes that allows you to create dynamically generated code by emitting IL instructions. The DynamicMethod and AssemblyBuilder classes are the work-horses for doing so. IL normally is loaded from an assembly, but there is no assembly when you generate the IL dynamically. An assembly object is however needed to act as the container of the IL code and a "fake" one is created by AppDomain.DefineDynamicAssembly(). That's what you see in the debugger notification.
You can't use Assembly.Load(), the assembly is created dynamically.
This is for DynamicMethods and thus goes for expressions too.
You cannot load it manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With