c# - C# 控制台应用程序可以在没有 Mono 的 Linux 中运行吗?

标签 c# linux mono

在关于 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/

相关文章:

C++ 在这种情况下如何使用 strtok

python - 如何不使用pip将软件包安装到anaconda

c# - 获取 DNS TXT 记录

c# - 在 Linux 上运行 Dot Net 项目 exe,它利用 System.Management 获取 USB 设备信息

asp.net-mvc - 带参数的 Xamarin ASP mvc 4 操作不起作用

c# - 无法将类型 'string' 转换为 'float'

c# - 自定义控件的 WPF 依赖属性

C# 多线程应用程序和 SQL 连接帮助

c# - 将 DbSet<TEntity> 属性移动到 Entity Framework Core 中的单独类

php - MariaDB 没有盯着看