簡體   English   中英

未找到Mono GAC DLL

[英]Mono GAC DLL Not Found

我對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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM