问题描述
可能重复:
如何使用 Mono 和 mkbundle 将简单的 .Net 控制台项目转换为可移植的 exe?
我有一个在 windows 上编写的 C# 程序,我需要将它传输到 linux 服务器.
但是客户不想在他的服务器上安装单声道,所以我想找到一种方法让他更容易.
是否可以将此程序转换为在没有安装单声道的情况下可以在 linux 上运行的格式?
I have a C# program which was written on windows, I need to transfer it to linux server.
However client doesn't want instal mono on his server, so I want to find a way to make it easy for him.
Is it possible to convert this program in such a format that it will run on linux without mono installed there?
推荐答案
你需要使用mkbundle如果您的目标系统没有安装单声道,请使用 --static
选项.
You need to use mkbundle with the --static
option if your target system does not have mono installed.
捆绑包还支持 --static 标志.--static 标志使 mkbundle 生成静态链接 Mono 运行时的静态可执行文件.请注意,此选项将触发 LGPL 要求,即您仍将独立部分分发给您的用户,以便他可以手动升级他的 Mono 运行时(如果他选择这样做)
Bundles in addition support a --static flag. The --static flag causes mkbundle to generate a static executable that statically links the Mono runtime. Be advised that this option will trigger the LGPL requirement that you still distribute the independent pieces to your user so he can manually upgrade his Mono runtime if he chooses to do so
这篇关于我有一个 C 语言程序,我可以将它编译为 Linux 服务器的可执行文件,以便我可以在服务器上运行它而无需安装单声道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!