在VS2015中直接调试没有问题,但是打包成exe并安装后,就报异常了,详细报错如下:
【异常类型】:InvalidCastException
【异常信息】:Specified cast is not valid.
【堆栈调用】: at Skybound.Gecko.nsIWebBrowser.GetContentDOMWindow()
at Skybound.Gecko.GeckoWebBrowser.OnHandleCreated(EventArgs e)
at System.Windows.Forms.Control.WmCreate(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Skybound.Gecko.GeckoWebBrowser.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Gecko内核来源:
http://www.m5home.com/blog/archives/2015/07/87.html