MonoDeveloper v에서 Mono.Texteditor.dll을 사용하여 자체 텍스트 편집기를 만들려고합니다 : 3.0.3.2 in 우분투 12.04. 가장 간단한 예제로 코드를 끓여서 사용할 수없는 것 같습니다. 이 오류가 계속 발생합니다.Mono.TextEditor 어셈블리를 사용하여 자체 텍스트 편집기 만들기
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;
}
}
인 텍스트 편집기가 구성되어 라인에 도달 할 때 확인 컴파일하더라도 발생, 다음과 같이
내 코드는 간단하다. 어떤 아이디어?
다음은 디버그 수준 로그의 출력입니다.
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
모노 버전 2.10.8.1-5에서 badgerports. 또한 TextEditor 객체의 생성자를 생성자 외부의 전역으로 이동하면 즉시 다른 아키텍처 용으로 컴파일 된 것과 같은 TypeLoadException을 갖게됩니다. 내 프로젝트는 .net4.0으로 설정되어 있고 설정에서 x86을 컴파일하는 64 비트 컴퓨터에 설치되어 있습니다. –
mono는 FileNotFoundExceptions (예 : https://bugzilla.xamarin.com/show_bug.cgi?id=10354) 대신 TypeLoadException을 던지는 버그가 있으므로 링크 된 로깅 환경 변수를 사용해야하므로 근본 원인을 찾으십시오 – knocte
아치는 모두 관리 코드 여야하므로 중요하지 않아야합니다. 중요한 것은 프로파일 (4.0 vs 3.5 vs 2.0) – knocte