GeckoFx, inicjowanie xulrunnera

GeckoFx, inicjowanie xulrunnera
BA
  • Rejestracja:ponad 12 lat
  • Ostatnio:prawie 10 lat
  • Postów:12
0

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

Kopiuj
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)
        {

        }
    }
}
Kopiuj
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

edytowany 1x, ostatnio: badowl
spartanPAGE
  • Rejestracja:prawie 12 lat
  • Ostatnio:dzień
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

edytowany 1x, ostatnio: spartanPAGE
BA
  • Rejestracja:ponad 12 lat
  • Ostatnio:prawie 10 lat
  • Postów:12
0

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

SO
  • Rejestracja:ponad 10 lat
  • Ostatnio:około rok
0

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

Zarejestruj się i dołącz do największej społeczności programistów w Polsce.

Otrzymaj wsparcie, dziel się wiedzą i rozwijaj swoje umiejętności z najlepszymi.