none
How to inject code into assembly ? RRS feed

  • Question

  • Hi
    i want to inject some code into .net assemblies. i've used reflector(and reflexil) but it can only change an existing code, wheras i want to add a new class or change class,enum, ... behaviaour.
    Any help would be great appreciated.
    thanks
    this is my Signature
    Friday, July 24, 2009 11:57 AM

Answers

  • Modifying the assembly directly is not something you should be pursue if you want to get this done before you graduate.  Leverage existing .NET tools.  Disassemble the assembly first with ildasm.exe, now it becomes a text parsing effort.  Put humpty-dumpty back together with ilasm.exe.  An open source project that injects code is Spring.NET.

    Hans Passant.
    • Proposed as answer by Harry Zhu Friday, July 31, 2009 5:10 AM
    • Marked as answer by Harry Zhu Monday, August 3, 2009 1:18 AM
    Friday, July 24, 2009 2:28 PM

All replies