CefSharp 3 browser displays blank page

I created a sample application using 64-bit version of CefSharp 3. It works great and all the required libraries are in the same folder as the main application executable. I'm wondering if there is a way to read the required CefSharp dlls from a different path.

I am looking for a folder structure as follows

Debug \ MYAPP.EXE

Debug \ Assemblies \ CefSharp.BrowserSubprocess.exe

Debug \ Assemblies \ CefSharp.BrowserSubprocess.exe

Debug \ Assemblies \ CefSharp.Core.dll

Debug \ Assemblies \ CefSharp.dll

Debug \ Assemblies \ CefSharp.Wpf.dll

Debug \ Assemblies \ icudt.dll

Debug \ Assemblies \ libcef.dll

Debug \ Builds \ Locales \ en-US.pak

In other words, I need to read the required dlls and cefsharp locales from different folders than my application (MyApp.exe)

I created a config file MyApp.exe.config as follows

  <?xml version="1.0"?>
    <configuration>

      <!--
        These settings only apply to the bootstrap AppDomain.
        Modify Web.config to alter the configuration of the application.
      -->

      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <probing privatePath="Assemblies"/>
        </assemblyBinding>
      </runtime>

      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
      </startup>

    </configuration>

      

but when using the above browser a blank page is displayed. it only works if everything is in one folder

Any help would be much appreciated

+3


source to share


1 answer


I finally found the problem. due to the browser launching on a separate process and the dependency on CefSharp.BrowserSubprocess.exe to CefSharp.dll and CefSharp.Core.dll, the same config file had to be created for the subprocess.



The only change I had to make was to create a CefSharp.BrowserSubprocess.exe.config file and copy the same configuration as in MyApp.exe.config

+1


source







All Articles