I want to embed a pre-existing DLL into a compiled C# executable (so that you only have one file to distribute). If it is possible, how would one go about doing it?
Thank.
Would compiling it into the resource segment and then unpacking it to use work for you? Or were you wanting to actually somehow link it in in-place somehow (the former is routine; the latter I have never tried to do)
What you could do, although it's a bit nasty, is have a helper executable that contains the executable and the DLL as arrays. When it's ran, it writes both to separate files and runs the executable. Then it waits for it to finish and then deletes the files.
This takes the least amount of effort, but I wouldn't do it if I could avoid it.