CEF - Embedded Chromium - C# Windows Form does not run on another machine


I have created an empty windows form application called "WindowsFormsApp2". To it I added the following Nuget packages:




The latter package added the following additional packages:




My app.config is (effectively I enabled the system diagnostic trace):

<?xml version="1.0" encoding="utf-8" ?>
    <trace autoflush="true">
        <add name="log" type="System.Diagnostics.TextWriterTraceListener" initializeData="output.log" />
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />

I then added the following code to the form:

public partial class Form1 : Form {
    private ChromiumWebBrowser chromeWebBrowser = null;

    public Form1() {
        try {
            Debug.WriteLine("Got here0");
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
            Debug.WriteLine("Got here1");
            Debug.WriteLine("Got here2");
            Cef.Initialize(new CefSettings());
            Debug.WriteLine("Got here3");
            this.chromeWebBrowser = new ChromiumWebBrowser("");
            Debug.WriteLine("Got here4");
            Debug.WriteLine("Got here5");
            this.chromeWebBrowser.Dock = DockStyle.None;
            Debug.WriteLine("Got here6");
            this.chromeWebBrowser.Height = Screen.GetWorkingArea(this).Height;
            Debug.WriteLine("Got here7");
            this.chromeWebBrowser.Width = Screen.GetWorkingArea(this).Width;
            Debug.WriteLine("Got here8");
            Debug.WriteLine("Got here9");
        } catch (Exception e) {
            Debug.WriteLine("Exception: " + e.ToString());
        } // try catch

    static void MyHandler(object sender, UnhandledExceptionEventArgs args) {
        Exception e = (Exception)args.ExceptionObject;
        Debug.WriteLine("Unhandled Exception: " + e.ToString());

I compile and run the form without issue on the compiling machine. It writes output to the DebugView application and also creates the output.log file. It opens up the form and it displays www.google.com inside of the browser.

I have a brand new VM with the latest Windows 10 updates including .Net Framework 4.8. I copy the contents of the build directory verbatim over to the new VM and when I run the EXE, there is no visual evidence that it ran. There are no entries to the DebugView window and there are no entries in the output.log file. The only evidence that it ran are 3 new window's event application logs.

Error - Event ID 1026:

Application: WindowsFormsApp2.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
   at WindowsFormsApp2.Form1..ctor()
   at WindowsFormsApp2.Program.Main()

Error - Event ID 1000

Faulting application name: WindowsFormsApp2.exe, version:, time stamp: 0xa390557a
Faulting module name: KERNELBASE.dll, version: 10.0.18362.267, time stamp: 0xf09944f9
Exception code: 0xe0434352
Fault offset: 0x000000000003a839
Faulting process id: 0x1c08
Faulting application start time: 0x01d54c7eda2259ba
Faulting application path: C:\Temp\FormApp\WindowsFormsApp2.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 181886c1-19f4-4931-91b1-95af1e001fec
Faulting package full name: 
Faulting package-relative application ID: 

Information - Event Id 1001:

Fault bucket 1306785398527647396, type 5
Event Name: CLR20r3
Response: Not available
Cab Id: 0

Problem signature:
P1: WindowsFormsApp2.exe
P3: a390557a
P4: WindowsFormsApp2
P6: a390557a
P7: 5
P8: 13
P9: System.IO.FileNotFoundException

Attached files:

These files may be available here:

Analysis symbol: 
Rechecking for solution: 0
Report Id: 181886c1-19f4-4931-91b1-95af1e001fec
Report Status: 268435456
Hashed bucket: bb3bca32b533c2a00222a26574e85ea4
Cab Guid: 0

If I remove the references to CEF from the form, then the form opens on both machines without issues. There is clearly some file being referenced by the CEF packages that isn't being put in the build directory, but I am not sure how to find out what it is.

Any ideas?

Thanks a bunch.

asked on Stack Overflow Aug 6, 2019 by Garet Jax

1 Answer


CEF is dependent on Microsoft Visual C++ 2015 Redistributable. Somehow missed that requirement.

answered on Stack Overflow Aug 6, 2019 by Garet Jax

User contributions licensed under CC BY-SA 3.0