Merging an Exe and a DLL with IL Merge
With the IL Merge program released by Microsoft, you can merge an exe and a dll file written in one of the .Net languages.
First, download the IL Merge program:
http://www.microsoft.com/en-us/download/details.aspx?id=17630
Install the program from the setup file. (ILMerge.msi)
Create a file with the .bat extension in the directory where your exe and dll files are, and put this in it:
ilmerge.exe /target:winexe /out:yeni_program.exe program.exe library.dll
Adjust the command to suit yourself: write the name of your own exe instead of program.exe, the name of your own dll instead of library.dll, and the name you want the resulting exe to have instead of yeni_program.exe.
When you run the batch file, the new exe will be waiting for you.
If you get a command not found error, copy the C:Program FilesMicrosoftILMergeILMerge.exe file into the program's directory.
*Because of the merge operation, some antivirus programs may flag your program as suspicious.