有没有工具可以将 CIL 编译为二进制文件?
看到上一篇文章“使用 .NET 编写应用程序后语言可以在旧机器上运行”,我想知道;
有没有工具可以将 CIL 编译为二进制文件?
如果是这样,如果您不希望用户需要 .NET 框架,您可以将 CIL 文件转换为本机 Windows 应用程序吗? 或者甚至从 .NET 瞄准 Linux 平台! 那将是真棒!
After seeing a previous post "Making Applications programmed in .NET languages work on older machines", I've got to wonder;
Are there tools to compile CIL to a binary?
If so, you could convert a CIL file to a native Windows app if you didn't want the user to require the .NET framework? Or even target the linux platform from .NET! That would be awesome!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
MS 提供了一个名为 NGEN 的免费实用程序,它可以从你的.NET程序集。
但请注意,CLR 仍然要求您的程序集可用于回退,以防本机映像失效,发生这种情况的原因有多种。 而且 NGEN 也不会消除最终用户安装 .NET Framework 的必要性。 最后,NGEN 可以更改应用程序的性能配置文件,但并不总是变得更好。
有一些实用程序,例如 VMWare ThinApp(以前称为 Thinstall),将创建一个本机二进制文件,其中包括您的应用程序和 .NET Framework 的相关部分。 这可能就是您正在寻找的。
MS provides a free utility called NGEN that creates a native Windows executable from your .NET assembly.
But be aware that the CLR still requires your assembly to be available for fallback in case of native image invalidation, which can happen for a number of reasons. And also NGEN doesn't remove the necessity for your end-user to have the .NET Framework installed. Finally, NGEN can change the performance profile of your app, not always for the better.
There are utilities such as VMWare ThinApp (formerly Thinstall) that will create a native binary that includes your app and the relevant parts of the .NET Framework. This may be what you're looking for.
看看这个:http://msdn.microsoft.com/en-us/ Library/6t9t5wcf.aspx
还有这个: http://www.xenocode.com/Products/Postbuild-for-NET/?AdGroup=Linking&gclid=CNGCo-7zopcCFSYMDQod0giG_A
Check this out: http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx
And this: http://www.xenocode.com/Products/Postbuild-for-NET/?AdGroup=Linking&gclid=CNGCo-7zopcCFSYMDQod0giG_A
Lego.NET 可以创建本机二进制文件,但它仍然相当有限。
Lego.NET can create native binaries, but it's still fairly limited.
有一些工具可以做到这一点,但它们基本上将整个 .NET 框架与您的二进制文件打包在一起,正如您可以想象的那样,这会导致相当大的膨胀。
如今,要求人们安装 .NET 已经不是什么难事了。 MS 甚至提供了一个 MSI 包,您可以将其包含到您自己的安装程序中,以便在安装您的程序时可以选择它。
There are tools to do it, but they basically package the entire .NET framework with your binary, which as you can imagine, causes considerable bloat.
Requiring people to have .NET installed isn't much of an ask these days. MS even provides an MSI package you can include into your own installer so that it's an option when they install your program.