我正在尝试在运行 Ubuntu Server 12.04 的服务器上运行 C# 控制台应用程序。我已经安装了 Mono JIT 版本 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2) 和其他软件包,例如gmcs
和MonoDevelop
. 我尝试执行的文件被调用Program.cs
,当我运行命令时$gmcs Program.cs
出现以下错误:
error CS0234: The type or namspace name 'Tasks' does not exist in the namespace 'system.Threading'. Are you missing assembly reference?
error CS0246: The type or namespace name 'MySql' could not be found. Are you missing a using directive or an assembly reference?
error CS0246: The type or namespace name 'MySqlConnection' could not be found. Are you missing a using directive or an assembly reference?
我已经研究过为上述命名空间引用 .dll 文件,但未能找到明确的答案。大多数论坛链接都建议我安装mono-trunk,但我想知道是否应该卸载现有的mono包然后安装mono-trunk。
我是 Unix 平台的新手,并且正在研究我的每一步。您的帮助将不胜感激。