C# Can';我不能让壁虎工作
如何在Visual Studio 2013中设置GeckoFX 我从下载了GeckoFS文件,并试图将C# Can';我不能让壁虎工作,c#,xulrunner,gecko,geckofx,C#,Xulrunner,Gecko,Geckofx,如何在Visual Studio 2013中设置GeckoFX 我从下载了GeckoFS文件,并试图将Geckofx Core.dll和Geckofx Winforms.dll添加到c#中的组件中。这很有效,我在表单中创建了一个浏览器,但在运行它时,我遇到了以下错误: An unhandled exception of type 'System.DllNotFoundException' occurred in Geckofx-Core.dll Additional information:
Geckofx Core.dll
和Geckofx Winforms.dll
添加到c#中的组件中。这很有效,我在表单中创建了一个浏览器,但在运行它时,我遇到了以下错误:
An unhandled exception of type 'System.DllNotFoundException' occurred in Geckofx-Core.dll
Additional information: Unable to load DLL 'xul': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
我尝试将各种版本的xulrunner
添加到项目中,如版本22和29,但这并没有消除错误
我只想做一个简单的windows窗体应用程序,使用最新的GeckoFX-29打开GeckoFX浏览器 首先,您需要下载xulrunner 29或Firefox 29 当路径是已安装的xulrunner 29或Firefox 29的文件夹时,需要调用
Xpcom.Initialize(path)
例如,如果您将Firefox 29安装到“c:\program Files x86\Mozilla Firefox\”
然后调用Xpcom.Initialize(@“c:\ProgramFilesx86\Mozilla Firefox\”)
这告诉geckofx在哪里可以找到xul.dll
然后可以在winforms应用程序中使用GeckoWebBrowser控件
注意-您还应确保您的主入口点具有
[STAThread]
属性。在我的情况下,此错误是由于我在Form1\u Load
函数中初始化了xulrunner
引起的。我通过在public Form1()
函数中初始化xulrunner
解决了这个问题