in

Utah .NET User Group

Home of Utah's professional .NET developers.

Justin Long's Blog

February 2005 - Posts

  • Manipulating other people’s assemblies

    This post was recovered from archive.org. It was origionally posted on Thursday, February 24, 2004

    Have you ever wanted to sign someone else’s assembly so you can reference them in your signed assemblies? Or change someone’s assembly from an executable to a library so you can reference it in visual studio? Well I have. And now I’ve finally found a way to do it with this extremely cool utility from Microsoft research called ILMerge.

    With this tool you can do all sorts of cool things that you couldn’t normally do without having the source. For instance you could sign someone’s unsigned assembly, combine multiple assemblies into one and convert an executable assembly into a library. You can also use ILMerge programmatically in your own applications. One easy way to do this is to make a copy of ILMerge.exe and use itself to convert the executable to a library using a command like this:

    ILMerge.exe /t:library /out:ILMerge.dll "Copy of ILMerge.exe"

    Keep in mind you should check out the assembly’s license before doing something like this to avoid any violations.

    Hope this helps someone out there. I thought it was extremely cool so I had to say something.

Copyright © 2000-2007, Utah .NET User Group
Powered by Community Server (Commercial Edition), by Telligent Systems