c# - 在 Linux 中运行用 Mono 编译的 C# 程序

标签 c# linux mono

我在 Ubuntu 中用 Mono 编译了一个简单的 helloworld 程序,我可以使用它来执行,

mono helloworld.exe

另外,我只能说,

helloworld.exe

并且有效。但是,在我必须从源代码构建 Mono 的另一台 Linux 机器中(与 Ubuntu 已经可用的软件包不同),后一个命令不起作用。它给了我错误,

-bash: ./helloworld.exe: cannot execute binary file

有什么建议吗?

谢谢,

最佳答案

您可能必须注册非 native 可执行格式,有关更详细的说明,请查看 here

关于c# - 在 Linux 中运行用 Mono 编译的 C# 程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16535703/

相关文章:

c# - 如何从 xamarin android 中的超链接 TextView 中删除下划线

c# - 调用 Blazor 应用程序时,Postman 调用无限旋转

linux - 将合并行批处理脚本转换为 shell

c# - Mono 上的 NServiceBus

c# - 如何获取链表的某一部分

c# - .NET Core 上的 Roslyn 脚本 API : why does compiler complain "error CS1501: no overload for WriteLine takes 2 arguments"?

linux - 了解技术(Docker)容器架构

windows - 我应该在 Linux 还是 Windows 中交叉编译?

nhibernate - 使用 NHibernate 和 Mono.Data.SQLite

c# - 无法使用 Mono.Cairo