简体   繁体   English

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

[英]why is gmcs command in bash(mono) missing the namespace `System.Threading'?

I input this command 我输入了这个命令

gmcs -t:library Program.cs

and get this error 并得到这个错误

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?

I get I have to give it the paths and everything, but how? 我知道我必须给它所有的路径,但是如何? can't find the way to do it 找不到办法

gmcs targets the .NET 2.0 profile, Task didn't exist back then. gmcs的目标是.NET 2.0配置文件,而Task当时不存在。

On a recent Mono just use mcs, as gmcs is deprecated and was removed from Mono 4.0. 在最近的Mono上,只需使用mcs,因为不推荐使用gmcs并将其从Mono 4.0中删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM