异常加载CEFSHARP.CORE.DLL

在我们的某些计算机上,尝试从WPF代码启动CefBrowser时遇到异常.我一直在尝试解决此问题,但无法真正理解出了什么问题.这些机器都是运行64位OS的Win7.

下面,我使用运行“ CefSharp.MinimalExample.Wpf.exe”的“ Dependency Walker”捕获了跟踪. (对于格式,我深表歉意,我不知道该如何改进.)

它开始运行,然后变成标准文本“无法加载文件或程序集’CefSharp.Core.dll’或其依赖项之一.找不到指定的模块.”

所以-有人知道下一步该怎么做吗?我真的猜不到!

日志文件来自

> Loaded "RPCRTREMOTE.DLL" at address 0x000007FEFDCE0000.  Successfully hooked module.
DllMain(0x000007FEFDCE0000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "RPCRTREMOTE.DLL" called.
DllMain(0x000007FEFDCE0000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "RPCRTREMOTE.DLL" returned 1 (0x1).
LoadLibraryExW("f:\public\dsu\debug\CefSharp.Core.dll", 0x0000000000000000, LOAD_WITH_ALTERED_SEARCH_PATH) called from "CLR.DLL" at address 0x000007FEE80DDB40.
Loaded "CEFSHARP.CORE.DLL" at address 0x000007FEE2DA0000.  Successfully hooked module.
Unloaded "CEFSHARP.CORE.DLL" at address 0x000007FEE2DA0000.
LoadLibraryExW("f:\public\dsu\debug\CefSharp.Core.dll", 0x0000000000000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: The specified module could not be found (126).
GetProcAddress(0x0000000077300000 [KERNEL32.DLL], "LCIDToLocaleName") called from "CLR.DLL" at address 0x000007FEE80FDCE7 and returned 0x0000000077308680.
GetProcAddress(0x0000000077300000 [KERNEL32.DLL], "GetLocaleInfoEx") called from "CLR.DLL" at address 0x000007FEE80FDCE7 and returned 0x00000000773035E0.
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\en-US\mscorrc.dll", 0x0000000000000000, LOAD_LIBRARY_AS_DATAFILE) called from "CLR.DLL" at address 0x000007FEE81652C4.
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\en-US\mscorrc.dll", 0x0000000000000000, LOAD_LIBRARY_AS_DATAFILE) returned NULL. Error: The system cannot find the file specified (2).
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\en\mscorrc.dll", 0x0000000000000000, LOAD_LIBRARY_AS_DATAFILE) called from "CLR.DLL" at address 0x000007FEE81652C4.
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\en\mscorrc.dll", 0x0000000000000000, LOAD_LIBRARY_AS_DATAFILE) returned NULL. Error: The system cannot find the file specified (2).
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorrc.dll", 0x0000000000000000, LOAD_LIBRARY_AS_DATAFILE) called from "CLR.DLL" at address 0x000007FEE81652C4.
Mapped "MSCORRC.DLL" as a data file into memory at address 0x0000000000590001.
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorrc.dll", 0x0000000000000000, LOAD_LIBRARY_AS_DATAFILE) returned 0x0000000000590001.
GetProcAddress(0x0000000077300000 [KERNEL32.DLL], "LocaleNameToLCID") called from "CLR.DLL" at address 0x000007FEE80FDCE7 and returned 0x0000000077304FA0.
GetProcAddress(0x0000000077300000 [KERNEL32.DLL], "GetUserDefaultLocaleName") called from "CLR.DLL" at address 0x000007FEE8202730 and returned 0x000000007734BB80.
GetProcAddress(0x0000000077300000 [KERNEL32.DLL], "GetUserPreferredUILanguages") called from "CLR.DLL" at address 0x000007FEE82026F5 and returned 0x000000007734BB70.
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\VERSION.dll", 0x0000000000000000, LOAD_WITH_ALTERED_SEARCH_PATH) called from "CLR.DLL" at address 0x000007FEE80DDB40.
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\VERSION.dll", 0x0000000000000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: The specified module could not be found (126).
LoadLibraryExA("VERSION.dll", 0x0000000000000000, 0x00000000) called from "CLR.DLL" at address 0x000007FEE81226AC.
Loaded "VERSION.DLL" at address 0x000007FEFCE30000.  Successfully hooked module.
DllMain(0x000007FEFCE30000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "VERSION.DLL" called.
DllMain(0x000007FEFCE30000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "VERSION.DLL" returned 1 (0x1).
LoadLibraryExA("VERSION.dll", 0x0000000000000000, 0x00000000) returned 0x000007FEFCE30000.
GetProcAddress(0x000007FEFCE30000 [VERSION.DLL], "GetFileVersionInfoSizeW") called from "CLR.DLL" at address 0x000007FEE80E8131 and returned 0x000007FEFCE315FC.
LoadLibraryExW("CEFSHARP.MINIMALEXAMPLE.WPF.EXE", 0x0000000000000000, LOAD_LIBRARY_AS_DATAFILE | 0x00000020) called from "VERSION.DLL" at address 0x000007FEFCE31523.
...
Mapped "CEFSHARP.MINIMALEXAMPLE.WPF.EXE" as a data file into memory at address 0x000000013F400000.
LoadLibraryExW("f:\public\dsu\debug\CEFSHARP.MINIMALEXAMPLE.WPF.EXE", 0x0000000000000000, LOAD_LIBRARY_AS_DATAFILE | 0x00000020) returned 0x000000013F400000.
GetProcAddress(0x0000000077300000 [KERNEL32.DLL], "GetThreadErrorMode") called from "CLR.DLL" at address 0x000007FEE84A9C64 and returned 0x0000000077365620.
GetProcAddress(0x0000000077300000 [KERNEL32.DLL], "SetThreadErrorMode") called from "CLR.DLL" at address 0x000007FEE84A9C77 and returned 0x0000000077365660.
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll", 0x0000000000000000, LOAD_WITH_ALTERED_SEARCH_PATH) called from "CLR.DLL" at address 0x000007FEE816BC48.
Loaded "DIASYMREADER.DLL" at address 0x000007FEE2C90000.  Successfully hooked module.
DllMain(0x000007FEE2C90000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "DIASYMREADER.DLL" called.
DllMain(0x000007FEE2C90000, DLL_PROCESS_ATTACH, 0x0000000000000000) in "DIASYMREADER.DLL" returned 1 (0x1).
LoadLibraryExW("C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll", 0x0000000000000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned 0x000007FEE2C90000.
GetProcAddress(0x000007FEE2C90000 [DIASYMREADER.DLL], "DllGetClassObject") called from "CLR.DLL" at address 0x000007FEE816BC79 and returned 0x000007FEE2CA090C.
Second chance exception 0xE0434352 (Unknown) occurred in "KERNELBASE.DLL" at address 0x000007FEFE03AAAD.
Exited "CEFSHARP.MINIMALEXAMPLE.WPF.EXE" (process 0x18D4) with code -532462766 (0xE0434352).

解决方法:

CefSharp是使用VC 2012 Update 4构建的.请注意x86和x64的变体,因此请确保您的应用程序匹配它们.

https://www.microsoft.com/en-us/download/details.aspx?id=30679

在对CefSharp进行故障排除时,有一些地方可以开始

> https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions
> https://github.com/cefsharp/CefSharp/blob/master/NuGet/Readme.txt#L16

上一篇:关于winform打包后,显示 CefSharp.core.dll 找不到指定的模块的解决方案。


下一篇:winform屏蔽鼠标右键