【问题标题】:why is gmcs command in bash(mono) missing the namespace `System.Threading'?为什么 bash(mono) 中的 gmcs 命令缺少命名空间“System.Threading”?
【发布时间】:2015-06-01 22:53:37
【问题描述】:

我输入了这个命令

gmcs -t:library Program.cs

得到这个错误

Program.cs(6,14): error CS0234: The type or namespace name `Tasks' does not exist in the namespace `System.Threading'. Are you missing an assembly reference?

我知道我必须给它路径和一切,但是如何?找不到方法

【问题讨论】:

  • gmcs 不是 bash 的一部分,如果您从任何其他 shell 调用它,或者根本没有 shell,它的行为方式相同。因此,不应将此问题标记为bash
  • ...然而,作为gmc 的一部分mono,这个问题应该被标记为mono
  • 你知道System.Threading.Tasks真的安装了吗?快速谷歌搜索一下,看起来有些打包者可能已将其移至外部库。
  • 类似——你实际运行的是哪个版本的 Mono?
  • hmmm...我在有限的系统上运行...是否可能不包含此 dll,我必须添加它?

标签: mono gmcs


【解决方案1】:

gmcs 针对 .NET 2.0 配置文件,Task 当时不存在。

在最近的 Mono 上,只需使用 mcs,作为 gmcs is deprecated 并从 Mono 4.0 中删除。

【讨论】:

    猜你喜欢
    • 2018-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-22
    相关资源
    最近更新 更多