Assembly from GAC is not listed in Monodevelop's Edit References dialog

扶醉桌前 提交于 2019-12-10 17:19:09

问题


I am trying to port a small console application from Windows/.NET to Ubuntu/Mono. I have problems to add a reference to the mono version of NLog, which I added to the GAC.

Adding NLog.dll to the assembly was confirmed: Installed NLog.dll into the gac (/usr/lib/mono/gac)

I also find it in the GAC under: /usr/lib/mono/gac/NLog/2.0.0.0__5120e14c03d0593c

First I thought that it was due to my umask 027. But I changed files to 644 and directories to 755. The problem persists.

I am working with: Ubuntu 10.04, Monodevelop 2.2.1, Mono version 2.4.4 (Debian 2.4.4~svn151842-1ubuntu4), Nlog NLog2.mono2-Beta1

Do you have any idea?


回答1:


The Edit References dialog does not show assemblies registered in the GAC, but assemblies registered by packages using a .pc file. That's explained in the MonoDevelop FAQ.

The GAC is an assembly registry meant to be used at run-time, not at development time. If your application depends on another assembly, that assembly either has to be provided by a package (and advertised through a .pc file) or has to be bundled together with your application. In the later case, you can just use a project or 'file' reference to the assembly.



来源:https://stackoverflow.com/questions/3996449/assembly-from-gac-is-not-listed-in-monodevelops-edit-references-dialog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!