dalefugier/SampleCsChromium

No webpage when not running from Debug

Closed this issue · 1 comments

If this project is run as Debug, using Rhino.exe as the application, the Chromium panel works fine and the webpage shows up. If one runs Rhino normally, the webpage never appears.

This can be fixed by adding these lines after https://github.com/dalefugier/SampleCsChromium/blob/master/SampleCsChromiumPanelControl.cs#L34:

string assemblyLocation = Assembly.GetExecutingAssembly().Location;
string assemblyPath = Path.GetDirectoryName(assemblyLocation);
string pathSubprocess = Path.Combine(assemblyPath, "CefSharp.BrowserSubprocess.exe");

var settings = new CefSettings();
settings.BrowserSubprocessPath = pathSubprocess;
Cef.Initialize(settings);