Type or namespace 'Mono' could not be found

蓝咒 提交于 2019-12-24 12:19:02

问题


I am trying to simply compile code from here https://github.com/neoeinstein/purpleonion

I have installed mono, monodevelop, .net framework 4 and gtk#

When I open the solution and try to compile any of the projects, I get this error, namespace 'Mono' could not be found.

How can it not be found? Isn't that the base namespace that must exist in mono?


回答1:


The Mono implementation of the BCL assemblies does not expose any additional API. If something's referring to a Mono namespace, it comes from another assembly, in this case Mono.Security.dll.

On Windows, MonoDevelop is capable of targeting either .NET or Mono. by default it targets .NET.

There are two ways you could fix this:

  1. Install the Mono.Security.dll assembly into .NET, assuming it works there. You would do this for compile-time by placing it in an "assembly folder"

  2. Set MonoDevelop to target the Mono framework using Project->Target Runtime or change the default in the .NET Runtimes options panel.



来源:https://stackoverflow.com/questions/7687997/type-or-namespace-mono-could-not-be-found

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