如何在可执行文件中添加DLL ...? [英] How to add DLL in Executable File...?
问题描述
我已经开发了一个看起来像计算器的Windows应用程序..但是我使用了一个名为calc.dll的第三方dll文件,
现在我的问题是,当我编译该项目时,它将创建像我的Calculator.exe文件以及calc.dll
这样的文件
但我希望输出将是一个像Calculator.exe这样的文件,并且它将包含该dll
我不想为我的项目创建安装项目,我只想通过双击使用计算器...
意味着当我编译项目时,我只会得到一个文件(在int exe和dll中都包含文件)作为输出
I have develop a Windows Application that will looks like a calculator.. but in that i have used one third party dll file named calc.dll,
now my question is when i compile that project it will create tow file like my Calculator.exe file as well as calc.dll
but i want the out put will be of one file like Calculator.exe and it will contain that dll
i don''t want to create a setup project for my project, i simply want to use my calculator by double clicking it...
means that when i compile the project i will get only one file(having both file in int exe and dll) as output
推荐答案
您需要看一下ILMerge .
下载:
http://www.microsoft.com/download/en/details.aspx?id=17630 [ ^ ]
CP文章:
使用ILMerge合并.NET程序集 [ http://ilmergegui.codeplex.com/ [ ^ ]
如果希望ILMerge参与构建过程,则需要对其进行配置以使其作为.exe项目的构建后任务运行.
You need to take a look at ILMerge.
Download:
http://www.microsoft.com/download/en/details.aspx?id=17630[^]
CP Article:
Merging .NET assemblies using ILMerge[^]
GUI Tool to make life easier:
http://ilmergegui.codeplex.com/[^]
If you want ILMerge to be part of your build process, you''ll need to configure it to run as a Post Build Task of your .exe project.
这篇关于如何在可执行文件中添加DLL ...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!