Search code examples
c#dotnetbrowser

DotNetBrowser: The assembly containing the binaries was not found in any of the lookup locations


I'm trying to use DotNetBrowser, but I'm getting an error:

Unable to find or restore compatible Chromium binaries. The assembly DotNetBrowser.Chromium.Win-86.dll containing the binaries was not found in any of the lookup locations

I think it's unable to extract the Chromium binaries, since the generated temp folder is empty:

AppData\Local\Temp\dotnetbrowser-chromium\69.0.3497.12.2.0.0.165\X86

What could I be missing here?

If I run the DotNetBrowser.WinForms.Demo.exe that comes with the download files, it works fine—but it doesn't extract the binaries, at least not into temp folder.

This is my code:

IEngine engine;
IBrowser browser;
BrowserView browserView = new BrowserView() {
    Dock = DockStyle.Fill
};
engine = EngineFactory.Create();
browser = engine.CreateBrowser();
browser.Navigation.LoadUrl("https://teamdev.com/dotnetbrowser");
browserView.InitializeFrom(browser);

I'm running this on a Windows Server 2012 Standard x64.


Solution

  • The Chromium binaries are packed into the corresponding DLLs - DotNetBrowser.Chromium.Win-86.dll and DotNetBrowser.Chromium.Win-64.dll.

    During runtime, DotNetBrowser checks the binaries presence in the specified directory and loads these DLLs and unpacks the binaries from them only if the check fails.

    The error message that you have specified appears if the unpacked binaries are missing and DotNetBrowser is unable to find and load the DotNetBrowser.Chromium.Win-86.dll to restore them.

    The most common solution for this case is to add the specified DLL to the project references or add it to the working directory of your application.

    In case of any further questions, feel free to contact us at [email protected].