【问题标题】:Runtime version issue using Mono on Linux Debian在 Linux Debian 上使用 Mono 的运行时版本问题
【发布时间】:2016-11-12 15:05:46
【问题描述】:

我正在尝试通过 Mono 在 Linux 上运行可执行程序(因为 Wine 不符合要求),我得到了这个输出。搜过了不知道怎么办:

警告:此应用程序支持的运行时版本不可用。 使用默认运行时:v4.0.30319 无法打开文件 /root/Desktop/tool\GeoIP.dat System.IO.DirectoryNotFoundException:找不到目录“/root/Desktop/tool\plugin\”。 在 System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) in :0 在 System.IO.Directory.GetFileSystemEntries(System.String 路径、System.String searchPattern、FileAttributes 掩码、FileAttributes attrs) 在:0 在 System.IO.Directory.GetFiles (System.String path, System.String searchPattern) in :0 在 njRAT.Form1。 (System.Object , System.EventArgs) 在 :0 在 System.Windows.Forms.Form.OnLoad (System.EventArgs e) in :0 在 System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) in :0 System.NullReferenceException:对象引用未设置为对象的实例 在 +。 () 在 :0 在 njRAT.Form1。 (System.Object , System.Windows.Forms.FormClosingEventArgs ) 在 :0 在 System.Windows.Forms.Form.OnFormClosing (System.Windows.Forms.FormClosingEventArgs e) 在:0 在 System.Windows.Forms.Form.FireClosingEvents (CloseReason 原因,布尔取消) in :0 在 (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:FireClosingEvents (System.Windows.Forms.CloseReason,bool) 在 System.Windows.Forms.Application.Exit (System.ComponentModel.CancelEventArgs e) in :0 在 System.Windows.Forms.Application.Exit () 在:0 在 System.Windows.Forms.Application.OnThreadException (System.Exception t) 在:0 在 System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) in :0 在 System.Windows.Forms.Form.OnCreateControl () 在:0 在 System.Windows.Forms.Control.CreateControl () 在:0 在 System.Windows.Forms.Control.WmShowWindow (System.Windows.Forms.Message& m) 在 :0 在 System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) 在 :0 在 System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) in :0 在 System.Windows.Forms.ContainerControl.WndProc (System.Windows.Forms.Message& m) in :0 在 System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m) in :0 在 System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) in :0 在 System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) in :0 在 System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) in :0

未处理的异常: System.NullReferenceException:对象引用未设置为对象的实例 在 +。 () 在 :0 在 njRAT.Form1。 (System.Object , System.Windows.Forms.FormClosingEventArgs ) 在 :0 在 System.Windows.Forms.Form.OnFormClosing (System.Windows.Forms.FormClosingEventArgs e) 在:0 在 System.Windows.Forms.Form.FireClosingEvents (CloseReason 原因,布尔取消) in :0 在 (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:FireClosingEvents (System.Windows.Forms.CloseReason,bool) 在 System.Windows.Forms.Application.Exit (System.ComponentModel.CancelEventArgs e) in :0 在 System.Windows.Forms.Application.Exit () 在:0 在 System.Windows.Forms.Application.OnThreadException (System.Exception t) 在:0 在 System.Windows.Forms.NativeWindow.OnThreadException (System.Exception e) 在:0 在 System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) in :0 在 System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) in :0 在 System.Windows.Forms.XplatUIX11.MapWindow (System.Windows.Forms.Hwnd hwnd, WindowType windows) in :0 在 System.Windows.Forms.XplatUIX11.CreateWindow (System.Windows.Forms.CreateParams cp) 在:0 在 System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams cp) in :0 在 System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams cp) 在:0 在 System.Windows.Forms.Control.CreateHandle () 在:0 在 System.Windows.Forms.Form.CreateHandle () 在:0 在 System.Windows.Forms.Control.CreateControl () 在:0 在 System.Windows.Forms.Control.SetVisibleCore(布尔值) 在:0 在 System.Windows.Forms.Form.SetVisibleCore (布尔值) 在:0 在 System.Windows.Forms.Control.set_Visible (布尔值) in :0 在 (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:set_Visible (bool) 在 System.Windows.Forms.Application.RunLoop (布尔模式,System.Windows.Forms.ApplicationContext 上下文) in :0 在 System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext 上下文) in :0 在 System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) in :0 在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () 在:0 在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) in :0 在 。 (System.String[]) 在 :0 [错误] 致命的未处理异常:System.NullReferenceException:对象引用未设置为对象的实例 在 +。 () 在 :0 在 njRAT.Form1。 (System.Object , System.Windows.Forms.FormClosingEventArgs ) 在 :0 在 System.Windows.Forms.Form.OnFormClosing (System.Windows.Forms.FormClosingEventArgs e) 在:0 在 System.Windows.Forms.Form.FireClosingEvents (CloseReason 原因,布尔取消) in :0 在 (wrapper remoting-invoke-with-check) System.Windows.Forms.Form:FireClosingEvents (System.Windows.Forms.CloseReason,bool) 在 System.Windows.Forms.Application.Exit (System.ComponentModel.CancelEventArgs e) in :0 在 System.Windows.Forms.Application.Exit () 在:0 在 System.Windows.Forms.Application.OnThreadException (System.Exception t) 在:0 在 System.Windows.Forms.NativeWindow.OnThreadException (System.Exception e) 在:0 在 System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) in :0 在 System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) in :0 在 System.Windows.Forms.XplatUIX11.MapWindow (System.Windows.Forms.Hwnd hwnd, WindowType windows) in :0 在 System.Windows.Forms.XplatUIX11.CreateWindow (System.Windows.Forms.CreateParams cp) 在:0 在 System.Windows.Forms.XplatUI.CreateWindow (System.Windows.Forms.CreateParams cp) in :0 在 System.Windows.Forms.NativeWindow.CreateHandle (System.Windows.Forms.CreateParams cp) 在:0 在 System.Windows.Forms.Control.CreateHandle () 在:0 在 System.Windows.Forms.Form.CreateHandle () 在:0 在 System.Windows.Forms.Control.CreateControl () 在:0 在 System.Windows.Forms.Control.SetVisibleCore(布尔值) 在:0 在 System.Windows.Forms.Form.SetVisibleCore (布尔值) 在:0 在 System.Windows.Forms.Control.set_Visible (布尔值) in :0 在 (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:set_Visible (bool) 在 System.Windows.Forms.Application.RunLoop (布尔模式,System.Windows.Forms.ApplicationContext 上下文) 在:0 在 System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext 上下文) in :0 在 System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) in :0 在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun () 在:0 在 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run (System.String[] commandLine) in :0 在 。 (System.String[]) in :0

【问题讨论】:

  • 什么程序? Directory '/root/Desktop/tool\plugin\' not found 这个目录是否存在并具有适当的权限(即:单声道可以访问)?

标签: linux mono debian exe wine


【解决方案1】:

与警告无关,但稍后显示异常。您的表单尝试从磁盘加载 GeoIP 文件,但它使用的是仅 Windows 的文件路径,这在 Linux 上肯定会失败。了解文件系统差异并修改您的代码。

【讨论】:

  • 我不明白
猜你喜欢
  • 1970-01-01
  • 2011-12-08
  • 2012-06-20
  • 2011-02-14
  • 2020-03-11
  • 1970-01-01
  • 2010-11-19
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多