Hi, You can use the peverify command line tool to analyze the validity of your IL, but from the look of it, you're calling instance methods without an appropriate instance.
On Wed, Mar 30, 2011 at 11:11 PM, Mazenx <[email protected]> wrote: > Instruction LastInstruction = > method.Body.Instructions[method.Body.Instructions.Count - 1]; > > > method.Body.CilWorker.InsertBefore(LastInstruction, FinishInstruction); Like here for instance. You're just inserting a callvirt without a target. I suggest you keep your logger instance in a local variable, and load it on the stack before calling your methods. Jb -- -- mono-cecil
