如何从C#程序集和DLL制作单个exe文件? [英] How to make a Single exe file from c# assembly and dll?
本文介绍了如何从C#程序集和DLL制作单个exe文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用ILmerge.
I used ILmerge.
它成功制作了一个merged_exe文件.(使用/zeroPekind选项)
And it made a merged_exe file succefully. (with /zeroPekind option)
但是,它不起作用.
我的工作很简单.我从SQLite文件中读取一个表,并创建一个文本文件.就是这样.
My work is very simple. I read a table from a SQLite file and make a text file. That is it.
我尝试在Mains()中使用"ResolveEventHandler".这也行不通.
I have tried to use "ResolveEventHandler" at the Mains(). It was not work too.
我该怎么办?
推荐答案
我使用了Costura.Fody.效果很好.
I used Costura.Fody. It works great.
Install-Package Costura.Fody
以下是使用VS添加的步骤.
Here is steps to add using VS.
- 转到工具-> Nuget程序包管理->程序包管理器控制台
- 确保在控制台中将您的项目选择为默认项目
- 键入命令"Install-Package Costura.Fody",然后按Enter.
- 编译并运行您的应用
- 您的exe准备就绪
- 但是您可以使用FodyWeavers.xml对其进行自定义
这篇关于如何从C#程序集和DLL制作单个exe文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文