当前位置:网站首页>C# 将dll打包到程序中
C# 将dll打包到程序中
2022-08-04 14:48:00 【林德熙】
本文告诉大家如何把 dll 打包到程序中。很多时候的 软件 在运行的时候需要包括很多 dll 或其他的文件,这样的软件在给其他小伙伴,就需要做一个压缩包,或者用安装软件。这样感觉不太好,所以本文告诉大家一个方法,把所有的 dll 放在一个文件,于是把自己的软件给小伙伴就只需要给他一个程序。
ILMerge
首先下载 ILMerge
然后安装,感觉安装很简单
假如有 1.exe 和 1.dll 准备把 1.dll 合并到 2.exe 那么可以使用下面代码
ilmerge /target:exe /out:E:\2.exe /log E:\1.exe /log E:\1.dll /targetplatform:v4这里的 target 为目标平台
out 就是输出的文件
log 就是准备合并的dll
执行代码就可以拿到 2.exe 直接把这个文件给小伙伴,他就不需要使用压缩包,直接打开 2.exe 就不会说找不到库。
参见:http://www.cnblogs.com/blqw/p/LoadResourceDll.html
边栏推荐
猜你喜欢
![[The Art of Hardware Architecture] Study Notes (1) The World of Metastability](/img/ac/54e4e13d9df90e96933c69623b770e.png)
[The Art of Hardware Architecture] Study Notes (1) The World of Metastability

1403. 非递增顺序的最小子序列

数据库恢复

Technology sharing | Description of the electronic fence function in the integrated dispatching system

X-ray grazing incidence focusing mirror

Find My Technology | Prevent your pet from getting lost, Apple Find My technology can help you

leetcode:254. 因子的组合

X射线掠入射聚焦反射镜

Hangzhou Electric School Competition (Counter Attack Index)

Zheng Qing freshmen school competition and middle-aged engineering selection competition
随机推荐
1403. Minimum Subsequence in Non-Increasing Order
token 过期后,如何自动续期?
leetcode: 241. Designing precedence for arithmetic expressions
【北亚数据恢复】IBM System Storage存储lvm信息丢失数据恢复方案
数据链路层-------以太网协议
杭电校赛(逆袭指数)
宣传海报
如何确定异步 I/O 瓶颈
【问题解决】QT更新组件出现 “要继续此操作,至少需要一个有效且已启用的储存库”
CCF GLCC正式开营|九州云开源专家携丰厚奖金,助力高校开源推广
leetcode: 259. Smaller sum of three numbers
广告电商系统开发功能只订单处理
Notes for xpath getting node with namespace
leetcode:251. 展开二维向量
word2003按空格键为什么会出现小数点
集合划分差最小问题(01背包)
输入输出流总结
xampp安装包含的组件有(php,perl,apche,mysql)
爬虫——动作链、xpath、打码平台使用
leetcode: 253. How many meeting rooms are required at least