简体   繁体   English

GeckoFX在Visual Studio 2013上不起作用

[英]GeckoFX does not work on visual studio 2013

i use GeckoFX 22 and xulrunner 22. \\After set a GeckoWebBrowser to a Winform program, a lot of work of my program done well, but when i set set a GeckoNode, it did not work, VS2013 throw an Exception with note: 我使用GeckoFX 22和xulrunner22。\\将GeckoWebBrowser设置为Winform程序后,我的程序的许多工作都做得很好,但是当我设置了GeckoNode时,它无法正常工作,VS2013抛出一个异常并带有注释:

" An exception of type 'System.NullReferenceException' occurred in Fifa17.exe but was not handled in user code Additional information: Object reference not set to an instance of an object. " Fifa17.exe中发生类型'System.NullReferenceException'的异常,但未在用户代码中处理。其他信息:对象引用未设置为对象的实例。

my code in that VS2013 throw an Exception is like that: 我在VS2013中抛出异常的代码是这样的:

    GeckoNode gncMatchEvents = myBrowser.Document.GetElementById("content").ChildNodes[0];

The mistery is that: if i do not set a GeckoNode, another compose of GeckoFX still work like that: 令人困惑的是:如果我不设置GeckoNode,则GeckoFX的另一种形式仍然可以这样工作:

    textBox1.Text = myBrowser.Document.GetElementById("content").ChildNodes[0].Length.ToString();

It's reaaly difficult to understand for me, thank for the answer. 对我来说,真的很难理解,谢谢您的回答。

i could repair the problem. 我可以修复问题。 There no any thing wrong in my code, but when i changed the version of GeckoFx and Xulrunner, everything run smoothly. 我的代码中没有任何错误,但是当我更改了GeckoFx和Xulrunner的版本时,一切运行顺利。 I changed to GeckoFx29 and Xulrunner29 and running on street. 我改为GeckoFx29和Xulrunner29并在街上跑步。 But if i use GeckoFx14 and Xulrunner14, it's also run well. 但是,如果我使用GeckoFx14和Xulrunner14,它也运行良好。 I was crazy in a week because that hell. 我一个星期疯了,因为那该死。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM