Reputation: 41
I have created a sample application using 64 version of CefSharp 3. It works fine while all the required libraries are in the same folder as the main application executable. I am wondering if there is a way to read the CefSharp required dlls from another 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\Assemblies\Locales\en-US.pak
in other words i need to read the required cefsharp dlls and locales from different folder than my application (MyApp.exe)
I have created the 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 still using the above browser shows blank page. it only works if all of them in one folder
Any help will be highly appreciated
Upvotes: 3
Views: 2524
Reputation: 41
I finally found the problem. due to running the browser on separate process and dependency of the CefSharp.BrowserSubprocess.exe to CefSharp.dll and CefSharp.Core.dll the same config file had to be created for the sub process.
The only change i had to make was creating the file CefSharp.BrowserSubprocess.exe.config and copy the same configuration as in MyApp.exe.config
Upvotes: 1