<bdo id='xdasW'></bdo><ul id='xdasW'></ul>

  1. <small id='xdasW'></small><noframes id='xdasW'>

      <tfoot id='xdasW'></tfoot>
    1. <i id='xdasW'><tr id='xdasW'><dt id='xdasW'><q id='xdasW'><span id='xdasW'><b id='xdasW'><form id='xdasW'><ins id='xdasW'></ins><ul id='xdasW'></ul><sub id='xdasW'></sub></form><legend id='xdasW'></legend><bdo id='xdasW'><pre id='xdasW'><center id='xdasW'></center></pre></bdo></b><th id='xdasW'></th></span></q></dt></tr></i><div id='xdasW'><tfoot id='xdasW'></tfoot><dl id='xdasW'><fieldset id='xdasW'></fieldset></dl></div>

      <legend id='xdasW'><style id='xdasW'><dir id='xdasW'><q id='xdasW'></q></dir></style></legend>

      是否可以将 .NET IL 代码编译为机器代码?

      时间:2023-10-06

      <legend id='x84zy'><style id='x84zy'><dir id='x84zy'><q id='x84zy'></q></dir></style></legend>

          • <bdo id='x84zy'></bdo><ul id='x84zy'></ul>
            • <i id='x84zy'><tr id='x84zy'><dt id='x84zy'><q id='x84zy'><span id='x84zy'><b id='x84zy'><form id='x84zy'><ins id='x84zy'></ins><ul id='x84zy'></ul><sub id='x84zy'></sub></form><legend id='x84zy'></legend><bdo id='x84zy'><pre id='x84zy'><center id='x84zy'></center></pre></bdo></b><th id='x84zy'></th></span></q></dt></tr></i><div id='x84zy'><tfoot id='x84zy'></tfoot><dl id='x84zy'><fieldset id='x84zy'></fieldset></dl></div>

                <small id='x84zy'></small><noframes id='x84zy'>

                <tfoot id='x84zy'></tfoot>
                  <tbody id='x84zy'></tbody>

                本文介绍了是否可以将 .NET IL 代码编译为机器代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想在没有 .NET 框架的情况下分发我的 .NET 程序.是否可以将 .NET 程序编译为机器码?

                I would like to distribute my .NET programs without the .NET framework. Is it possible to compile a .NET program to machine code?

                推荐答案

                是的,你可以使用 Ngen.exe 进行预编译,但这并不能消除 CLR 依赖.

                Yes, you can precompile using Ngen.exe, however this does not remove the CLR dependence.

                您还必须提供 IL 程序集,Ngen 的唯一好处是您的应用程序可以在不调用 JIT 的情况下启动,因此您可以获得真正的快速启动时间.

                You must still ship the IL assemblies as well, the only benefit of Ngen is that your application can start without invoking the JIT, so you get a real fast startup time.

                根据 CLR 通过 C#:

                According to CLR Via C#:

                此外,使用预编译的程序集Ngen 通常比 JIT 慢程序集,因为 JIT 编译器可以针对目标机器进行优化(32 位?64 位?特殊寄存器?等),而 NGEN 只会产生一个基线编译.

                Also, assemblies precompiled using Ngen are usually slower than JIT'ed assemblies because the JIT compiler can optimize to the targets machine (32-bit? 64-bit? Special registers? etc), while NGEN will just produce a baseline compilation.

                对于来自 CLR Via C# 的上述信息存在一些争议,因为有人说您只需要在目标机器上运行 Ngen 作为安装过程的一部分.

                There is some debate on the above info from CLR Via C#, as some say that you are required to run Ngen on the target machine only as part of the install process.

                这篇关于是否可以将 .NET IL 代码编译为机器代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:CLR 与 JIT 下一篇:为什么 C# 编译器不阻止属性引用自己?

                相关文章

                • <bdo id='PTLkA'></bdo><ul id='PTLkA'></ul>
                <legend id='PTLkA'><style id='PTLkA'><dir id='PTLkA'><q id='PTLkA'></q></dir></style></legend>
              1. <tfoot id='PTLkA'></tfoot>
                1. <i id='PTLkA'><tr id='PTLkA'><dt id='PTLkA'><q id='PTLkA'><span id='PTLkA'><b id='PTLkA'><form id='PTLkA'><ins id='PTLkA'></ins><ul id='PTLkA'></ul><sub id='PTLkA'></sub></form><legend id='PTLkA'></legend><bdo id='PTLkA'><pre id='PTLkA'><center id='PTLkA'></center></pre></bdo></b><th id='PTLkA'></th></span></q></dt></tr></i><div id='PTLkA'><tfoot id='PTLkA'></tfoot><dl id='PTLkA'><fieldset id='PTLkA'></fieldset></dl></div>

                    <small id='PTLkA'></small><noframes id='PTLkA'>