I'm getting CefSharp setup for the first time. I've installed the NuGet CefSharp.WinForms version 99.2.90. I've ran it in both build x64 and x86. x64 threw a DLL error which shows me it should be built in x86. I've tried quite a few different methods I've found online but simply starting CefSharp throws an error.
running chromeBrowser = new ChromiumWebBrowser("www.google.com"); results in the below error:
[0315/133306.821:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=-532462766
[0315/133306.821:WARNING:gpu_process_host.cc(1277)] The GPU process has crashed 6 time(s)
[0315/133306.821:FATAL:gpu_data_manager_impl_private.cc(447)] GPU process isn't usable. Goodbye.
The program '[18264] CefSharp.exe' has exited with code 1073741855 (0x4000001f).
Form Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CefSharp.WinForms;
using CefSharp;
using System.Threading;
using System.IO;
using System.Diagnostics;
using CefSharp.DevTools.IO;
namespace TemarkNamespace
{
public partial class CefSharpController : Form
{
private ChromiumWebBrowser chromeBrowser;
public CefSharpController()
{
InitializeComponent();
chromeBrowser = new ChromiumWebBrowser("www.google.com");
}
private void FormClosed(object sender, FormClosedEventArgs e)
{
Cef.Shutdown();
}
}
}
Event Viewer error:
Application: CefSharp.BrowserSubprocess.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.BadImageFormatException
at CefSharp.BrowserSubprocess.Program.Main(System.String[])
I missed the instructions https://github.com/cefsharp/CefSharp/blob/cefsharp/99/NuGet/Readme.txt#L13 I created the app.manifest file and it worked great. Thanks for the help amaitland!