簡體   English   中英

Raspberry Pi上Linux環境中的Windows Forms錯誤

[英]Windows Forms error in Linux environment on Raspberry Pi

我已經用C#開發了一個完整的應用程序,該程序可以完全在Windows中工作。 我現在在Linux上安裝了mono(在RPi上安裝了Debian),並正在執行該應用程序。

第一種形式(登錄形式)加載得很好。 在此表單上輸入用戶詳細信息,如果正確,則應關閉該表單並打開下一個表單。

以下代碼來自登錄表單,並且在我按下“登錄”后立即執行:

this.Hide();
Entry_System fm = new Entry_System();
fm.ShowDialog();
this.Show();

但是,在Linux中,該表單僅關閉並且發生以下錯誤:

System.TypeLoadException:發生類型加載異常。 在System.Windows.Forms.Control.OnClick(System.EventArgs e)[0x00000]在System.Windows.Forms.Button.OnClick(System.EventArgs e)[0x00000]在0.System.Windows.Forms .ButtonBase.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent)[0x00000]在System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs mevent)[0x00000]在0.System.Windows .Forms.Control.WmLButtonUp(System.Windows.Forms.Message&m)[0x00000]在System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message&m)[0x00000]在系統:0時.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message&m)[0x00000]在System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message&m)[0x00000]在:0中位於System.Windows.Forms.Control + ControlWindowTarget.OnMessage(System.Windows.Forms.Message&m)處[0x00000]位於System.Windows.Forms.Control + ControlNativeWindow.WndProc的:0中(System.Windows.Forms.Message&m) System.Windows.Forms.NativeWi上<文件名未知>:0中的[0x00000] ndow.WndProc(IntPtr hWnd,Msg msg,IntPtr wParam,IntPtr lParam)[0x00000] in:0

在Windows中,下一個窗體將按預期方式打開。 通過復選框選擇的任何一種形式都是這種情況。

我已經運行了apt-get更新,apt-get mono完成,因此它們是最新版本。 該應用程序在Windows上編譯。 我知道mono是一個經過充分討論的主題,並且Pi上存在一些問題,但是據我了解,諸如此類的基本功能在Soft Float Debian上應該可以正常工作。

您可能會遇到此錯誤該錯誤已在Mono 3.0.3中修復。

我認為apt-get不會確保您獲得這樣的新版本。 您可以通過運行命令“ mono --version”來確認。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM