Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 找不到Mono GAC DLL_C#_Linux_Dll_Mono - Fatal编程技术网

C# 找不到Mono GAC DLL

C# 找不到Mono GAC DLL,c#,linux,dll,mono,C#,Linux,Dll,Mono,我是mono c#开发的新手,在我的应用程序中包含外部DLL时遇到了问题 我正在使用CentOS 7,试图包含Npgsql.dll模块 目前我的申请表如下 using System; using System.IO; using Npgsql; public class TestApp { static public void Main(string[] la_args) { Console.WriteLine("Nothing"); } } 我将Npgsql.dll

我是mono c#开发的新手,在我的应用程序中包含外部DLL时遇到了问题

我正在使用CentOS 7,试图包含Npgsql.dll模块

目前我的申请表如下

using System;
using System.IO;
using Npgsql;

public class TestApp {
   static public void Main(string[] la_args) {
      Console.WriteLine("Nothing");
   }
}
我将Npgsql.dll包含到GAC中

# gacutil -i Ngsql.dll
# Installed Npgsql.dll into the gac (/usr/local/lib/mono/gac)
但当我试图编译它时,仍然会产生一个错误

# mcs TestApp.cs
# error CS0246: The type or namespace name `Npgsql' could not be found. Are you missing an assembly reference?

我遗漏了什么吗?

这是一个暂时的答案,因为我认为这可能只是一个解决办法。如果我直接在编译中包含dll,它似乎可以正确编译

# mcs TestApp.cs -r:Npgsql.dll