C#将dll打包到程序中技巧之一
来源:互联网 发布:淘宝怎么匿名购买 编辑:程序博客网 时间:2024/06/15 21:47
废话就不多说了,直接进入主题吧
用VS2005建立一个windows项目,取名test
引用dll文件
编写代码,正常引用dll里的类库,
同时在test项目添加资源文件(该文件就是刚才引用的dll文件)
VS2005会自动生成引用代码,我这里引用的是IrisSkin2.dll
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
然后在Main(program.cs)函数里加入代码
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
编译test项目,生成exe文件,
然后删除引用的dll文件(注意是先编译,再删除)
复制该exe文件就可以在别的地方运行了(不用dll,运行EXE会自动生成DLL文件)
0 0
- C#将dll打包到程序中技巧之一
- C#将dll打包到程序中技巧之二
- C#将dll打包到程序中
- C#将dll打包到程序中的具体实现
- C# 将dll打包到exe中有效方式暨.net程序自动更新有效方式
- C#将项目的dll,打包到exe文件中,使用LoadResourceDll类
- C#项目将dll打包进exe中
- C#之将DLL组件添加到工具箱选项中...
- 将.net framework打包到安装程序中
- C#将dll打包进exe
- 转: 如何将dll 程序集安装到GAC中?
- 将dll部署到全局程序集缓存(GAC)中
- 将dll部署到全局程序集缓存(GAC)中
- C#使用EPPlus.dll动态库在一般处理程序中实现将datatable导出到excel
- 将midas.dll编译到程序中,避免Midas.dll与程序一起发布
- C# 将dll打包进exe dll静态引用
- C# winform 中把引用的dll都打包到一个exe中的方法
- C++打包DLL在C#中调用
- ArcGlobe三维开发之十七——书签
- Java规则表达式
- 图像I、B、P帧介绍
- 第五周作业——有向图邻接表表示及反向图构造
- eclipse 不自动编译java文件的问题
- C#将dll打包到程序中技巧之一
- 常用处理数据库大数据访问的方法
- 第十五题 求取1+2+3+......+n
- EasyUI searchbox用法
- Spark SQL Columnar模块源码分析
- Linux Netcat 命令——网络工具中的瑞士军刀
- J - What day is that day?(zoj水题)
- C#将dll打包到程序中技巧之二
- hdu4283(区间DP)