如何将所有C#输出合并到一个.exe文件中 [英] How can I combine all C# output into one .exe file
本文介绍了如何将所有C#输出合并到一个.exe文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了一个C#桌面程序.在我的项目中,有一些子项目,其最终输出是几个.exe文件和许多DLL.那么,如何将所有程序组合到一个.exe文件中? :sigh :: cool:
I have created a C# desktop program. In my project there are some sub projects and its final output are several .exe files and many DLLs. So how can I combine all my programs into one .exe file? :sigh::cool:
推荐答案
您可以将它们与ILMerge合并.
http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx [^ ]
这是doanload页面:
http://msdn.microsoft.com/en-us/netframework/aa569269 [ ^ ]
这是与此有关的CodeProject文章:
使用ILMerge合并.NET程序集 [
You can merge them with ILMerge.
http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx[^]
Here''s the doanload page:
http://msdn.microsoft.com/en-us/netframework/aa569269[^]
Here''s a CodeProject article about it:
Merging .NET assemblies using ILMerge[^]
我听说有人想要组合1个exe +将多个DLL合并为一个exe.但是您有多个exe.您为什么要将它们组合成一个exe?那会实现什么?
如果部署是您的问题,那么有很多解决方案.
另外,由于您拥有所有源代码,因此只需将所有内容移到一个项目中即可.您甚至不必更改任何代码(除了可能需要稍微调整名称空间).
I''ve heard of people wanting to combine 1 exe + several DLLs into a single exe. But you have multiple exes. Why would you want to combine them into a single exe? What would that achieve?
If deployment is your problem, there are so many solutions to that.
Alternatively, since you own all the source code, just move everything into a single project. You probably won''t even have to change any code (except maybe tweak the namespaces around a little).
这篇关于如何将所有C#输出合并到一个.exe文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文