none
merging classes library into executable RRS feed

  • Question

  • My apologize if i have post at a wrong forum.

    I write many classes library in C#, which will compile to myLibrary.something.dll
    and within each dll, there have many classes/modules

    I want to merge the Dlls in to my executable project which are reference them, so that the executable are not required the Dlls in the same folder to run.
    I found the ILMerge tool, but this tool are not able to fulfill my need.

    I want to merge/import only the used classed/modules/functions into the executable,
    because those Dlls contain huge numbers of classes/modules, but i does not need them in all kind of project.
    is it possible to do that?
    of cause I own the sources of those Dlls.

    I do not know how to explain well, but if someone familiar with Flex compiler (Flash) should know this feature.

    thank you very much
    Saturday, December 26, 2009 2:24 AM

Answers

  • Thank you Himadri and Gnanadurai

    I found a tool from mono project that fulfill my needs.
    I like to share it with everyone that have same need as me

    Mono Linker
    linker will find and match any used modules in primary assembly and create a new referred
    assembly with the used modules only


    • Marked as answer by codetale Monday, December 28, 2009 4:19 AM
    Monday, December 28, 2009 4:19 AM

All replies

  • I don't think there is any tool out there which can do it. Your need is very specific. If you need to do it only once I would suggest you just do it manually. I mean find out the dependent classes and add them in the executable project. Otherwise, you have to write your own program to find out required class from the executable and dlls.
    Saturday, December 26, 2009 4:47 PM
  • Hi,
    Why you not use the reflection for this.at run time you can load your DLL .
    http://msdn.microsoft.com/en-us/library/cxz4wk15.aspx
    hope it helps


    Best Regards, C.Gnanadurai ----------------------- Please mark the post as answer if it is helpfull to you
    Sunday, December 27, 2009 3:09 PM
  • Thank you Himadri and Gnanadurai

    I found a tool from mono project that fulfill my needs.
    I like to share it with everyone that have same need as me

    Mono Linker
    linker will find and match any used modules in primary assembly and create a new referred
    assembly with the used modules only


    • Marked as answer by codetale Monday, December 28, 2009 4:19 AM
    Monday, December 28, 2009 4:19 AM