星期六, 3月 20, 2010

Port Mini c# Lab to mono

在 Linux mono 平台上缺少了一個輕量級的開發工具,而 snippetcompiler 又沒有 open source,所以腦筋就動到 黑暗執行緒 開發的 Mini C# Lab 上。

下載原始碼以後,先試著用 MonoDevelop 開啟,但卻因為路徑與檔名問題失敗,Linux 使用的路徑分隔字元與 Windows 不同,對大小寫檔名也比較嚴格,調整以後,就能開啟了。

接著去編譯,稍微調整 References 以後,也可以順利編譯。

最後要執行了,卻出現下面的錯誤:
Unhandled Exception: System.EntryPointNotFoundException: HideCaret
at (wrapper managed-to-native) ICSharpCode.TextEditor.Caret:HideCaret (intptr)
at ICSharpCode.TextEditor.Caret.DisposeCaret () [0x00000]
at ICSharpCode.TextEditor.Caret.RecreateCaret () [0x00000]
at ICSharpCode.TextEditor.TextArea.OptionsChanged () [0x00000]
at ICSharpCode.TextEditor.TextArea..ctor (ICSharpCode.TextEditor.TextEditorControl motherTextEditorControl, ICSharpCode.TextEditor.TextAreaControl motherTextAreaControl) [0x00000]
at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextArea:.ctor (ICSharpCode.TextEditor.TextEditorControl,ICSharpCode.TextEditor.TextAreaControl)
at ICSharpCode.TextEditor.TextAreaControl..ctor (ICSharpCode.TextEditor.TextEditorControl motherTextEditorControl) [0x00000]
at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextAreaControl:.ctor (ICSharpCode.TextEditor.TextEditorControl)
at ICSharpCode.TextEditor.TextEditorControl..ctor () [0x00000]
at (wrapper remoting-invoke-with-check) ICSharpCode.TextEditor.TextEditorControl:.ctor ()
at MiniCSharpLab.Form1.InitializeComponent () [0x00000]
at MiniCSharpLab.Form1..ctor () [0x00000]
at (wrapper remoting-invoke-with-check) MiniCSharpLab.Form1:.ctor ()
at MiniCSharpLab.Program.Main (System.String[] args) [0x00000]


問題應該就出在 ICSharpCode.TextEditor.dll 裡,有空再用 MoMA 來分析或挖 ICSharpCode.TextEditor.dll 看看好了。

沒有留言: