如何将 .NET exe 转换为不需要 .NET Framework 运行的 Windows 二进制文件?
我有一个在 Visual Studio 2010 下编译的 exe 文件(它的源项目是一个带有 C# 的 Windows 窗体应用程序)。
我必须将此 exe 嵌入到 installsheild msi 安装文件中它可以安装在任何Windows操作系统上(支持XP及更高版本)。但为了运行我的 exe,最终用户必须首先在其系统上安装 Microsoft .net Framework 4。 我正在寻找一种解决方案,将 .NET 本机 exe 转换为 .NET-FREE exe,无需安装 .NET Framework 即可执行。
有什么办法可以做到这一点吗? (我的意思是期望mono-project)
I've an exe file which is compiled under visual studio 2010(It's source project is a Windows Form Application with C#).
I must embed this exe in a installsheild msi setup file & it may be installed on any windows operating system(XP and later versions are supported). but for running my exe, end-users have to install Microsoft .net framework 4 on their systems at first.
I'm looking for a solution to convert my .NET native exe to a .NET-FREE exe which can be executed without having .NET Framework installed.
Is there any way to do this? (I mean a way EXPECT mono-project)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Mono 支持提前编译,至少在某些平台上是这样。您也许还可以在您的程序中部署单声道。但我不确定 Mono 是否支持 Windows 上的 WinForms。
我认为 Microsoft 的 .net 实现不支持这种部署,所以你运气不好。
Mono supports ahead of time compilation, at least on some platforms. You might also be able to deploy mono with your program. But I'm not sure if Mono supports WinForms on windows.
I don't think Microsoft's .net implementation supports such a kind of deployment, so you're out of luck.
您无法创建不依赖 .NET 的应用程序,但您可以尝试使用 ILMerge 实用程序。例如,我成功地使用它来将 3d 方工具需求从 .NET 4.5 降低到 4.0。
该工具有很多参数,但通常您需要的如下:
现在确定这是否是您的问题,但在某些情况下可能会有所帮助。
You can't create .NET-free application, but you can try to decrease .NET version requirements as much as you can by using ILMerge utility. For example I was successfully used it to decrease a 3d-party tool requirements from .NET 4.5 to 4.0.
The tool has much parameters, but usually all what do you need is the following:
Now sure whether it is your question, but it may help in some cases.