TheDotNetBrowser.Chromium.dll library contains Chromium binaries. At first run, DotNetBrowser extracts the binaries from the DLL into user’s temp directory.


Extracting binaries


The default location that is used for storing the extracted binaries is a subfolder named dotnetbrowser-chromium-[chromium_version].[DotNetBrowser_version] ordotnetbrowser-chromium\[chromium_version].[DotNetBrowser_version] of the temporary folder for the current user. 

You can specify the directory path into which DotNetBrowser will look for Chromium binaries before creating anyBrowserinstance by calling the BrowserPreferences.SetChromiumDir()method.


The DotNetBrowser behavior related to unpacking and checking the presence of the Chromium binaries was slightly changed in DotNetBrowser 1.11.


The behavior of DotNetBrowser 1.10 and all the previous versions:

  1. During the creation of the first Browser instance, DotNetBrowser checks the value returned by the GetChromiumDir() method.
  2. If the returned path points to the default binaries location, DotNetBrowser checks the presence of the Chromium executable in the default location.
    1. If the Chromium executable was not found, DotNetBrowser extracts all the binaries to the default location.
  3. If the returned path points to the nondefault binaries location, DotNetBrowser checks the presence of the Chromium executable and throws an exception if the executable was not found.
  4. DotNetBrowser tries to launch the Chromium process.


To obtain the unpacked binaries, you need to perform the following actions:

  1. Launch DotNetBrowser application once with the default binaries location configured (for example, you can launch DotNetBrowser demo application from the distribution archive and wait until it loads the default page). 
  2. Close the application and go to the default binaries location. You will find the unpacked binaries there.
  3. Copy all the contents of the directory except the "data" folder to the desired location.


After that, you can configure DotNetBrowser to use the binaries using the BrowserPreferences.SetChromiumDir()method. ThechromiumDir parameter must contain a valid path to the directory with extracted Chromium binaries.


The behavior of DotNetBrowser 1.11 :

  1. During the creation of the first Browser instance, DotNetBrowser checks the presence of all the Chromium binaries in the location returned by the GetChromiumDir() method.
  2. If any of the binary files do not exist then DotNetBrowser will try to extract those binaries into the folder returned by the GetChromiumDir() method. This will be done even in the case when the non-default binaries location was set.
  3. DotNetBrowser tries to launch the Chromium process.