开发者

C# Compile dll into exe [duplicate]

开发者 https://www.devze.com 2023-03-25 02:40 出处:网络
This question already has an answer here: Closed 11 years ago. Possible Duplicate: Including dll's in the exe?
This question already has an answer here: Closed 11 years ago.

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:

  1. Include the source of the DLL in your project itself.
  2. Use ILMerge
0

精彩评论

暂无评论...
验证码 换一张
取 消