Rednet Rednet - 7 months ago 69
Vb.net Question

How do i add Firefox extensions to GeckoFX?

i'v been googling around for the whole day searching for a tutorial how to use Firefox extensions in "Geckofx" ( vb.net ) couldn't find any.
anyone has an idea ?

Answer

Please see this ticket in the Geckofx repository. I believe it is the closest answer you will be able to get: https://bitbucket.org/geckofx/geckofx-29.0/issues/211/firefox-extension-in-geckofx

This appears to be related to a bug in Geckofx. Here is the most helpful comment on that page:

First, add the location where the extension is deployed using

Xpcom.ComponentRegistrar.AutoRegister():
void RegisterExtensionDir(string dir)
{
    Console.WriteLine("Registering binary extension directory:  " + dir);
    var chromeDir = (nsIFile)Xpcom.NewNativeLocalFile(dir);
    var chromeFile = chromeDir.Clone();
    chromeFile.Append(new nsAString("chrome.manifest"));
    Xpcom.ComponentRegistrar.AutoRegister(chromeFile);
}

Second, do NOT use the ABI flag in the extension's chrome.manifest. So instead of

binary-component components/GeckoScraper.dll ABI=WINNT_x86-msvc

I used

binary-component components/GeckoScraper.dll