One Assembly for 2 Projects RRS feed

  • Question

  • Can we have 2 Different Visual Studio 2008 Projects Compile into a Single Assembly.

    I have One Dll and one Exe project.

    I want both of them to compile into one Exe Project. Is that possible.?
    Monday, September 22, 2008 5:38 AM




          If the DLL and Executable file are both written in managed code, I think we could merge them into one DLL file with this tool ILMerge from Microsoft.   It is a utility can be used to merge multiple assemblies into one single assembly, and it is freely available here.   

           So, please follow these steps to merge the files:

    1.       Download ILMerge.

    2.       Copy the ILMerge.exe into your Windows directory

    3.       “Start” à ”Run” à “cmd”

    4.       Ilmerge /t:library  /out:YourOutputDllName.dll  InputDllName.dll   InputExeName.dll (Of course the file names are all with their paths)

           For detail of how to use ILMerge, we could refer to the Word document of ILMerge after this tool is installed.   


           If you have any more questions, please just let me know.



    Best Regards,

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, September 24, 2008 6:02 AM