![运行 Windows 应用程序时 Mono 出现问题](https://linux22.com/image/981729/%E8%BF%90%E8%A1%8C%20Windows%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%97%B6%20Mono%20%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98.png)
mono myfile.exe
System.DllNotFoundException: wininet.dll
at (wrapper managed-to-native) Multiple_Website_Viewer.Form1:InternetSetOption (intptr,int,intptr,int)
at Multiple_Website_Viewer.Form1.UseProxy (System.String strProxy) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Multiple_Website_Viewer.Form1:UseProxy (string)
at Multiple_Website_Viewer.Form1.Button2_Click (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown>:0
我该怎么办?谢谢。
答案1
错误本身非常容易理解:System.DllNotFoundException: wininet.dll
- 您缺少wininet.dll
Windows 专有项目。因此我们必须安装它。
您可以尝试这样做:winetricks wininet
- 它会尝试安装 DLL。但是,据报道,这既可以工作也可以不工作,具体取决于您的 Wine 版本。