0xd4d / dnlib

Reads and writes .NET assemblies and modules
MIT License
2.13k stars 582 forks source link

Injecting type referencing Windows' mscorlib to assembly that uses Mono's mscorlib #62

Closed ViRb3 closed 8 years ago

ViRb3 commented 8 years ago

Say I have a class called TypeA. It is in the same program that uses dnlib to inject this class, called ProgramA. I am loading an assembly, ProgramB, that uses Mono's mscorlib and cannot use Windows' mscorlib. Is there any way I can inject TypeA in ProgramB, making it use Mono's mscorlib instead of Windows'? TypeA does some very simple operations so everything is covered in Mono.

Thanks!

ViRb3 commented 8 years ago

I found a solution in yck's ConfuserEx project.