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 d开发者_高级运维ll into the exe, so I do not have to worried about the deployment?
Thnks.
See this MSR page for information on ILMerge as well as a clever alternative documented by Jeffrey Richter.
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:
- Include the source of the DLL in your project itself.
- Use ILMerge
精彩评论