为什么bash(mono)中的gmcs命令缺少名称空间“System.Threading';”;?

为什么bash(mono)中的gmcs命令缺少名称空间“System.Threading';”;?,mono,gmcs,Mono,Gmcs,我输入这个命令 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针对.NET

我输入这个命令

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针对.NET 2.0配置文件,任务当时不存在


在最近的Mono上,只需使用mcs,因为和已从Mono 4.0中删除。

gmcs
不是bash的一部分,如果您从任何其他shell调用它,或者根本没有shell,它的行为也会相同。因此,不应将此问题标记为
bash
…但是,由于
gmc
mono
的一部分,因此应将此问题标记为
mono
。您知道实际安装了
System.Threading.Tasks
?快速的谷歌搜索使它看起来像是一些包装商把它移到了一个外部库中。类似地,你实际运行的是哪个版本的Mono?嗯。。。我在一个有限的系统上运行。。。有没有可能这个dll没有包括在内,我将不得不添加它?