当前位置:网站首页>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
边栏推荐
- Makefile syntax and usage notes
- Android Sqlite3基本命令
- 【 HMS core 】 【 Media 】 online video editing service 】 【 material can't show, or network anomalies have been Loading state
- Win10无法访问移动硬盘怎么解决
- Basic Introduction for PLSQL
- 基于 Next.js实现在线Excel
- 兆骑科创创新创业大赛活动举办,线上直播路演,投融资对接
- JCMsuite Application: Oblique Plane Wave Propagation Transmission Through Aperture
- Qt的QItemDelegate使用
- vim 常用操作命令
猜你喜欢
编译型与解释型编程语言的区别
LeetCode_模拟_中等_498.对角线遍历
leetcode: 241. Designing precedence for arithmetic expressions
leetcode: 250. Count subtrees of equal value
一看就会的Chromedriver(谷歌浏览器驱动)安装教程
数据链路层-------以太网协议
Problem solving-->Online OJ (18)
X射线掠入射聚焦反射镜
CCF GLCC officially opened | Kyushu Cloud open source experts bring generous bonuses to help universities promote open source
leetcode:250. 统计同值子树
随机推荐
快解析结合友加畅捷U+
【北亚数据恢复】IBM System Storage存储lvm信息丢失数据恢复方案
leetcode:251. 展开二维向量
How to write SQL statements: the usage of Update, Case, and Select together
FRED应用:毛细管电泳系统
Workaround without Project Facets
xpath获取带命名空间节点注意事项
leetcode: 259. Smaller sum of three numbers
砺夏行动|九州云章津楠:开源不是少数人的运动,大众化才是源泉
[in-depth study of 4 g / 5 g / 6 g project - 50] : URLLC - 16 - the 3 GPP URLLC agreement, specification, technical principle of depth interpretation - 10 - high reliability technology - 1 - low codin
Zheng Qing freshmen school competition and middle-aged engineering selection competition
华为云 & 达达,帮有情人“一键送达”
Almost all known protein structures in the world are open sourced by DeepMind
leetcode: 250. Count subtrees of equal value
16、学习MySQL 正则表达式
leetcode: 241. Designing precedence for arithmetic expressions
SQL语句的写法:Update、Case、 Select 一起的用法
Technology sharing | Mini program realizes audio and video calls
X-ray grazing incidence focusing mirror
指数族分布与最大熵