Could not load file or assembly 'CefSharp.WinForms.DLL' or one of its dependencies

1,488 views
Skip to first unread message

Scott

unread,
Sep 18, 2012, 8:19:56 PM9/18/12
to cefs...@googlegroups.com
I am trying to include CefSharp in an Excel Add-In project.  The details are:

  • Using CefSharp 1.19.0 binary distribution (all .dll's from distribution in same dir as my add-in .dll)
  • Built using VS 2010
  • .Net 4
  • x86 Platform (but happens with AnyCPU as well)
  • Excel Add-In running in WinXP/Excel 2007 and Win7/Excel 2010 (both give the same problem)
  • VS 2008 C++ redistributable package installed
The Add-In .dll config file has:

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

The code in the Form is as follows:

        web_view = new WebView("https://github.com/ataranto/CefSharp", new BrowserSettings());

When this code tries to execute, C# tries to load CefSharp.WinForms.DLL and throws and exception.

When I look at CefSharp.WinForms.DLL in Dependency Walker, it shows that libcef.dll tries to load the following .dll files that cannot be found:

  • MSVCR90.DLL (although it finds this .dll earlier in the dependency check)
  • GPSVC.DLL
  • IESHIMS.DLL
The list of missing .dll's reported by Dependency Walker is slightly different for WinXP and Win7.

Does anyone know what could be causing this error?   Or how to get around it?

Is what I'm trying to do possible?

Thanks, scott

puresimmer

unread,
Sep 21, 2012, 8:26:12 AM9/21/12
to cefs...@googlegroups.com
As a test, try copying all the CEF release DLLs to the dir where Excel.exe is.  If you make a simple Winforms app in the same folder as the addin and associated dlls and add that same line of code, does the Winforms app run ok?

Scott

unread,
Sep 24, 2012, 10:59:59 AM9/24/12
to cefs...@googlegroups.com
I tried adding all of the CefSharp .dll's to the same directory as Excel.exe.  But that did not solve the problem.  I will try building  simple winform app with CefSharp to see if that works.  But that is what the sample app does.  I'll report back what I find.

scott
Reply all
Reply to author
Forward
0 new messages