Hey, On Fri, Sep 10, 2010 at 2:01 PM, Regis <[email protected]> wrote: > I want to create an AssemblyDefinition with two modules : the manifest > m0 plus an external module m1. > > If I define the body of the entry point of my assembly in order to > call a method in a class defined in my external module, do I have to > call > > _il.Emit(OpCodes.Call, m0.Import(myExternalMethod)) > > or > > _il.Emit(OpCodes.Call, myExternalMethod) ? > > In fact, as it is the same assembly but another module, I am not sure > what to do.
Import doesn't support multiple modules assemblies. But you can't use a definition from another module directly. So you have to create references, and use a proper ModuleReference as a scope. -- Jb EvainĀ <[email protected]> -- -- mono-cecil
