Search code examples
c#.netwinformschromiumcefsharp

CefSharp ChromiumWebBrowser put all dependencies in different Folder


I am using CefSharp.ChromiumWebBrowser 49.0.0 in winform Dotnet Framework 4.0

Following files required in executable/Application folder:

cef.pak
CefSharp.BrowserSubprocess.Core.dll
CefSharp.BrowserSubprocess.exe
CefSharp.Core.dll
CefSharp.dll
CefSharp.WinForms.dll
cef_100_percent.pak
cef_200_percent.pak
cef_extensions.pak
d3dcompiler_43.dll
d3dcompiler_47.dll
devtools_resources.pak
HAP.dll
icudtl.dat
libcef.dll
libEGL.dll
libGLESv2.dll
loc.txt
natives_blob.bin
snapshot_blob.bin
widevinecdmadapter.dll

I want to put all these files in separate Folder Not in my application folder.

I have gone through several SO posts like How to reference C# dll located in different folder to a C# winforms exe in different folder

But i want all the dependent files of CefSharp in different folder or Directory.

How to do that ?


Solution

  • Try using Copy Local in References as False as : References of Project

    use assemblyBinding in App.config as :

    <configuration>  
       <runtime>  
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
             <probing privatePath="bin;bin2\subbin;bin3"/>  
          </assemblyBinding>  
       </runtime>  
    </configuration>