来自GAC的程序集未在Monodevelop的“编辑参考"对话框中列出 [英] Assembly from GAC is not listed in Monodevelop's Edit References dialog

查看:119
本文介绍了来自GAC的程序集未在Monodevelop的“编辑参考"对话框中列出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一个小型控制台应用程序从Windows/.NET移植到Ubuntu/Mono.我在添加对我添加到GAC的NLog单一版本的引用时遇到问题.

已确认将NLog.dll添加到程序集中:将NLog.dll安装到gac(/usr/lib/mono/gac)

我还在GAC中的以下位置找到了它:/usr/lib/mono/gac/NLog/2.0.0.0__5120e14c03d0593c

首先,我认为这是由于umask 027引起的.但是我将文件更改为644,将目录更改为755.问题仍然存在.

我正在使用:Ubuntu 10.04,Monodevelop 2.2.1,Mono 2.4.4版(Debian 2.4.4〜svn151842-1ubuntu4),Nlog NLog2.mono2-Beta1

你有什么主意吗?

解决方案

编辑参考"对话框不显示在GAC中注册的程序集,而是显示使用.pc文件的程序包注册的程序集.在 GAC是一个程序集注册表,旨在在运行时而非开发时使用.如果您的应用程序依赖于另一个程序集,则该程序集要么必须由程序包提供(并通过.pc文件发布),要么必须与您的应用程序捆绑在一起.在后一种情况下,您可以仅使用程序集的项目或文件"引用.

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?

解决方案

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.

这篇关于来自GAC的程序集未在Monodevelop的“编辑参考"对话框中列出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆