2016-12-02 150 views
2

嘗試使用CefSharp.Wpf構建應用程序,每當我使用Nuget.org構建時,一切都可以正常工作,但是當我添加自定義libcef.dll構建時,Cef初始化會返回false。我編譯了相同的版本,使用cef-binary來修改軟件包,但是Cef.Initialize失敗沒有任何錯誤。你知道任何方法如何調試Cef.Initialize中發生的事情,以及如何捕獲它沒有初始化的錯誤或原因?這裏是代碼:CEF初始化返回false

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

在此先感謝!

回答

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); 

所以儘量舊版本。