Thanx Andrew for your answer. After I inserted IL Code, the references was added automatically. That's great.
I have found another problem with Mono.Cecil. Maybe it doesn't work with an obfuscated assembly, does it??? When I tested the library, I try to load an obfuscated assembly but it crashes just at beginning. ***** AssemblyDefinition adOriginal = AssemblyFactory.GetAssembly(strFileName); ***** That is this software http://www.snapfiles.com/get/saferspace.html It is only my test. Download some softwares written in .NET, and try to load it with Cecil. And it crashes with this. I found that this is obfuscated. Maybe that is the reason that Cecil can't load it. Just my assumption. Although Mono.Cecil could not load this assembly, I can use System.Reflection to load it. It's weird. Regards. --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
