none
Combining dlls into single exe using .Net 2.0 RRS feed

  • Question

  • I have a c#(windows) solution which comprises many projects. I am using a dll which is been used by all the projects in the solution. Now I wanna convert that dll as embedded resource. I wanna use single exe to run the projects without the dll reference. Is that possible in .Net 2.0?

    Any solution?

    Monday, October 12, 2015 6:32 AM

Answers

  • Hi P Nandhan,

    Do you want to create a single exe file? I am afraid embedded resource can't do it for you. You could try use ILMerge to merge multiple .NET assemblies into a single assembly.

    Any way you could compressors like ZIP and 7Zip offer you the ability to create a self-extracting executable. Which is the regular compressed file plus the executable code needed for decompressing. Packed into a single file. 7zip offers the option to create self-extracting archives for installers. Maybe you can use this option to run a standard program instead of an installer anyway: http://7zip.bugaco.com/7zip/MANUAL/switches/sfx.htm

    Best Regards,
    Li Wang

    • Marked as answer by P Nandhan Wednesday, October 14, 2015 6:49 AM
    Tuesday, October 13, 2015 1:51 AM
    Moderator

All replies

  • Hi P Nandhan,

    Do you want to create a single exe file? I am afraid embedded resource can't do it for you. You could try use ILMerge to merge multiple .NET assemblies into a single assembly.

    Any way you could compressors like ZIP and 7Zip offer you the ability to create a self-extracting executable. Which is the regular compressed file plus the executable code needed for decompressing. Packed into a single file. 7zip offers the option to create self-extracting archives for installers. Maybe you can use this option to run a standard program instead of an installer anyway: http://7zip.bugaco.com/7zip/MANUAL/switches/sfx.htm

    Best Regards,
    Li Wang

    • Marked as answer by P Nandhan Wednesday, October 14, 2015 6:49 AM
    Tuesday, October 13, 2015 1:51 AM
    Moderator
  • If you want to use "ILMerge" utility as mentioned by "Li Wang" then following link may help

    http://www.codeproject.com/Articles/9364/Merging-NET-assemblies-using-ILMerge


    Gaurav Khanna | Microsoft .NET MVP | Microsoft Community Contributor

    Tuesday, October 13, 2015 10:48 AM