我正在尝试使用 ubuntu 12.04 中 MonoDeveloper v:3.0.3.2 中的 Mono.Texteditor.dll 制作自己的文本编辑器。我已将我的代码简化为最简单的示例,但我似乎无法让它工作。我不断收到此错误。
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly
'Mono.TextEditor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of
its dependencies. File name: 'Mono.TextEditor, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null' at CVXmlEditor.MainClass.Main (System.String[] args) [0x00000]
in <filename unknown>:0
我知道它已经安装并且我添加的它是作为我的项目的参考。
我的代码很简单如下:
using System;
using Gtk;
using Mono.TextEditor;
public partial class MainWindow: Gtk.Window
{
public MainWindow (): base (Gtk.WindowType.Toplevel)
{
Build ();
TextEditor te = new TextEditor();
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
}
}
当 is 到达构建文本编辑器的行时,即使编译正常,它也会抛出。有任何想法吗?
这是调试级别日志的输出。
Mono: The following assembly referenced from /home/bryan/Work/CVXmlEditor/TestMonoEditor/TestMonoEditor/bin/Debug/TestMonoEditor.exe could not be loaded:
Assembly: Mono.TextEditor (assemblyref_index=2)
Version: 1.0.0.0
Public Key: (none)
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/bryan/Work/CVXmlEditor/TestMonoEditor/TestMonoEditor/bin/Debug/).
Mono: Failed to load assembly TestMonoEditor[0xf55400]
Mono: Could not load file or assembly 'Mono.TextEditor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The application was terminated by a signal: SIGHUP