c# - Linux 上的单声道 : mkbundle does not find shared libraries

标签 c# mono dependencies shared-libraries mkbundle

我有一个小型 C# 应用程序,我想将其转换为 native 可执行二进制文件。 csc Foo.cs 运行时没有警告,我可以毫无问题地运行应用程序:mono Foo.exe

然而,当我启动 mkbundle 时,我得到这个错误:

$ mkbundle Foo.exe
Failure to load i18n assemblies, the following directories were searched for the assemblies:
Path: .
In Custom mode, you need to provide the directory to lookup assemblies from using -L
ERROR: Couldn't load one or more of the i18n assemblies: Failed to load I18N.dll

我在 /usr/lib/mono/... 找到了 I18N.dll 的各种版本,并且在将其中一个的父目录传递给 mkbundle 之后使用 -L,一切正常。

但为什么我必须这样做? -L 选项未在我在网上找到的任何示例中使用。

我是否处于“自定义模式”?如果是这样,什么是自定义模式? 我更希望这是缺少环境变量的问题,但我不知道我必须更改什么。

非常感谢!

最佳答案

如果您的程序集不使用国际化 (i18n),请尝试 mkbundle --i18n none

关于c# - Linux 上的单声道 : mkbundle does not find shared libraries,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50356909/

相关文章:

linux - 如何在 MonoDevelop 中以 Debug模式执行之前添加导出命令

c# - 在根目录中获取文件数组的最有效方法(如果存在)

c# - Mono + 命名/可选参数 = 编译器错误?

gradle - 如何让gradle从~/.ivy2/local中查找依赖项

node.js - 如何在某个日期之前安装 Node 包及其依赖项?

c# - 任务构造函数与 Task.Run with async Action - 不同的行为

c# - 如何从 Azure 函数返回 JSON

c# - C# 的垃圾收集会导致实时音频应用程序出现问题吗?

c# - 错误处理 MVC View 与 PartialView

PHP:处理项目中的文件版本依赖性