CEF初始化返回false

时间:2016-12-02 09:43:11

标签: c# cefsharp

尝试使用CefSharp.Wpf构建应用程序,每当我使用Nuget.org构建时,一切都可以正常工作,但每当我添加自定义libcef.dll构建时,Cef初始化都会返回false。我编译了相同的版本,使用cef-binary来修改包,但是Cef.Initialize失败没有任何错误。你知道如何调试Cef.Initialize中发生的事情的任何方法,以及如何捕获错误或原因为什么它没有初始化?这是代码:

CefSettings settings = new CefSettings();
Boolean status = CefSharp.Cef.Initialize(settings, performDependencyCheck: false, browserProcessHandler: null);

提前致谢!

1 个答案:

答案 0 :(得分:0)

升级到版本53后出现此错误。 在我使用版本51之前没有问题。 此版本的初始化代码略有不同

CefSettings settings = new CefSettings();

// Disable GPU in WPF and Offscreen until GPU issues has been resolved
settings.CefCommandLineArgs.Add("disable-gpu", "1");

//Perform dependency check to make sure all relevant resources are in our output directory.
Cef.Initialize(settings, shutdownOnProcessExit: true, performDependencyCheck: true);

所以试试旧版本。

相关问题