当前位置:网站首页>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
边栏推荐
- CF1527D MEX Tree (mex & tree & inclusive)
- 爬虫——selenium基本使用、无界面浏览器、selenium的其他用法、selenium的cookie、爬虫案例
- Win10无法访问移动硬盘怎么解决
- Qt的QItemDelegate使用
- Oracle database user creation, restart, import and export
- leetcode:254. 因子的组合
- Almost all known protein structures in the world are open sourced by DeepMind
- Notes for xpath getting node with namespace
- Sum of four squares, laser bombs
- 指数族分布与最大熵
猜你喜欢

leetcode:212. 单词搜索 II

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

Rust from entry to proficient 04-variables

eNSP-小型网络拓扑(DNS、DHCP、网站服务器、无线路由器)

16、学习MySQL 正则表达式

【剑指offer59】队列的最大值

广告电商系统开发功能只订单处理

leetcode: 254. Combinations of factors

CCF GLCC officially opened | Kyushu Cloud open source experts bring generous bonuses to help universities promote open source

idea去掉spark的日志
随机推荐
【剑指offer59】队列的最大值
[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
用了TCP协议,就一定不会丢包吗?
leetcode:255 验证前序遍历序列二叉搜索树
X射线掠入射聚焦反射镜
OAID是什么
华为云 & 达达,帮有情人“一键送达”
【历史上的今天】8 月 4 日:第一位图灵奖女性得主;NVIDIA 收购 MediaQ;首届网络安全挑战大赛完成
[Problem solving] QT update component appears "To continue this operation, at least one valid and enabled repository is required"
word2003按空格键为什么会出现小数点
This week to discuss the user experience: Daedalus Nemo to join Ambire, explore the encryption of the ocean
蓝牙技术|上半年全国新增 130 万台充电桩,蓝牙充电桩将成为市场主流
杭电校赛(逆袭指数)
关于pnpm包管理器的版本问题
1403. Minimum Subsequence in Non-Increasing Order
SQL语句的写法:Update、Case、 Select 一起的用法
JCMsuite Application: Oblique Plane Wave Propagation Transmission Through Aperture
什么,你告诉我?作用域也分种类?
7 天能找到 Go 工作吗?学学 Go 数组和指针试试
JCMsuite应用:倾斜平面波传播透过光阑的传输