GeckoFx, inicjowanie xulrunnera

0

Witam, przy wykonywaniu poniższego kodu pojawia się błąd

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Gecko;

namespace GeckoBrowser
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Gecko.Xpcom.Initialize("xulrunner");
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
An unhandled exception of type 'System.DllNotFoundException' occurred in Geckofx-Core.dll

Additional information: Unable to load DLL 'xul': Nie można odnaleźć określonego modułu. (Exception from HRESULT: 0x8007007E) 

Folder debug:
-bin
-xulrunner
-GeckoBrowser.exe
-GeckoBrowser.exe.config
-GeckoBrowser.pdb
-GeckoBrowser.vshost.exe
-GeckoBrowser.vshost.exe.config
-GeckoBrowser.vshost.exe.manifest
-Geckofx-Core.dll
-Geckofx-Core.pdb
-Geckofx-Winforms.dll
-Geckofx-Winforms.pdb

Próbowałem już chyba wszystkiego, proszę o pomoc. Pozdrawiam

1

Firstly you need to download either xulrunner 29 or Firefox 29.

The you need to call Xpcom.Initialize(path) when path is the folder of the installed xulrunner 29 or Firefox 29.

For example If you installed Firefox 29 to "c:\program Files x86\Mozilla Firefox"

Then you would call Xpcom.Initialize(@"c:\program Files x86\Mozilla Firefox")

This tells geckofx where to find xul.dll.

Then you can use the GeckoWebBrowser control in your winforms application.

Note - you should also ensure that your Main entry point has the [STAThread] attribute.

source

0

prawidłowa ścieżka do xulrunnera to @"bin//xulrunner", może się komuś przydać

0

Prawidłowa ścieżka do xulrunnera jest taka, jak ścieżka do folderu w którym go umieściłeś...

1 użytkowników online, w tym zalogowanych: 0, gości: 1