In my case the ModuleLoader was defined in a class library project that the main executable referenced, so I think this was the reason the exception was thrown.
That doesn't seem likely. If you can successfully compile expressions such as
new ModuleLoader(engine), then you have a compile-time reference to
ModuleLoader, and instantiation via
Activatorshould be unnecessary. Indeed, the exception indicates a problem with dynamic property assignment rather than
ModuleLoaderinstantiation. We'd like to understand the issue, but we can't reproduce it, so please provide any additional information you can.
Still not clear what the context variable is though!
loadfunction. Among other things,
completeLoadfunction that must be called to report that the requested resource has been loaded.