当前位置:网站首页>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
边栏推荐
- Compound Refractive Lenses for X-ray Focusing
- 【硬件架构的艺术】学习笔记(1)亚稳态的世界
- 蓝牙技术|上半年全国新增 130 万台充电桩,蓝牙充电桩将成为市场主流
- Android Sqlite3基本命令
- eNSP-小型网络拓扑(DNS、DHCP、网站服务器、无线路由器)
- Theory 1: Deep Learning - Detailed Explanation of the LetNet Model
- 16、学习MySQL 正则表达式
- 【HMS core】【Media】【视频编辑服务】 在线素材无法展示,一直Loading状态或是网络异常
- 解题-->在线OJ(十八)
- [机缘参悟-60]:《兵者,诡道也》-1-开篇:“死“与“生“都是天道
猜你喜欢
微软表示将向内部网络安全专家共享数据 为企业提供更安全保护

四平方和,激光炸弹

【北亚数据恢复】IBM System Storage存储lvm信息丢失数据恢复方案

Crawler - basic use of selenium, no interface browser, other uses of selenium, cookies of selenium, crawler cases

数据库恢复

token 过期后,如何自动续期?

Lixia Action | Kyushu Yunzhang Jinnan: Open source is not a movement for a few people, popularization is the source

1403. Minimum Subsequence in Non-Increasing Order

世间几乎所有已知蛋白质结构,都被DeepMind开源了

How to automatically renew the token after it expires?
随机推荐
How to fall in love with a programmer
Lixia Action | Kyushu Yunzhang Jinnan: Open source is not a movement for a few people, popularization is the source
G. Mountaineering Squad (violence & dfs)
Set partition minimum difference problem (01 knapsack)
如何和程序员谈恋爱
ASA归因:如何评估关键词的投放价值
leetcode: 253. How many meeting rooms are required at least
基于 Next.js实现在线Excel
JCMsuite Application: Oblique Plane Wave Propagation Transmission Through Aperture
【硬件架构的艺术】学习笔记(1)亚稳态的世界
Qt的QItemDelegate使用
uni-app 从零开始-生命周期(二)
华为云 & 达达,帮有情人“一键送达”
九州云出席领航者线上论坛,共话5G MEC边缘计算现状、挑战和未来
【剑指offer59】队列的最大值
word2003按空格键为什么会出现小数点
化繁为简,聊一聊复制状态机系统架构抽象
【历史上的今天】8 月 4 日:第一位图灵奖女性得主;NVIDIA 收购 MediaQ;首届网络安全挑战大赛完成
Technology sharing | Description of the electronic fence function in the integrated dispatching system
Why does the decimal point appear when I press the space bar in word 2003?