0

Possible Duplicate:
Including dll's in the exe?

I am referencing a dll in my project. It runs fine, but in the /bin/release/ folder contain an exe and a dll. when I remove the dll the exe won't work. How can I compile the dll into the exe, so I do not have to worried about the deployment?

Thnks.

Community
  • 1
  • 1
kelvinfix
  • 2,915
  • 8
  • 37
  • 49

2 Answers2

1

DLL's are not statically linked (as the name itself suggests) otherwise it won't be a DLL :)

There are two ways to get a monolithic binary:

  1. Include the source of the DLL in your project itself.
  2. Use ILMerge
Vijay Gill
  • 1,508
  • 1
  • 14
  • 16
1

See this MSR page for information on ILMerge as well as a clever alternative documented by Jeffrey Richter.

Marcelo Cantos
  • 181,030
  • 38
  • 327
  • 365