在关于 CIL 的维基百科 ( https://en.wikipedia.org/wiki/Common_Intermediate_Language#General_information ) 中,它说:
Upon execution of a CLI assembly, its code is passed through the runtime's JIT compiler to generate native code. Ahead-of-time compilation may also be used, which eliminates this step, but at the cost of executable-file portability.
那么,有没有一种方法可以使用提前编译来使 Mono 编译,以生成可以像用 C/C++ 编写的二进制文件一样执行的 native 代码?
最佳答案
简短的回答是肯定的。 Mono 确实在 http://www.mono-project.com/docs/advanced/aot/ 上有它的信息.
简单来说就是在开发的时候需要Mono来进行AOT。然后可以将生成的二进制文件部署到没有 Mono 的机器上(尽管有一些限制)。
关于c# - C# 控制台应用程序可以在没有 Mono 的 Linux 中运行吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38958420/